bar with text on the right and left

Discussion in 'HTML' started by Tarscher, Dec 17, 2007.

  1. Tarscher

    Tarscher Guest

    hi all,

    I have a menu and want some items to appear on the left side, others
    on the right side of the menubar.

    I try
    <div>
    <a href="/">Home</a>
    <a href="/calendar">Games</a>
    <span style="float: right;">
    <a href="/edit">Profile</a>
    <a href="/tree">User</a>
    </span>
    </div>

    The span that contains the style="float: right;" should position it to
    the right of the div? The span is actually positioned right underneath
    the div. I don't see why?

    Maybe someone can tell me why this doesn't work and how I should solve
    this (tested on ie and firefox)

    Many thanks in advance
     
    Tarscher, Dec 17, 2007
    #1
    1. Advertising

  2. Tarscher wrote:

    > I have a menu and want some items to appear on the left side, others
    > on the right side of the menubar.
    >
    > I try
    > <div>
    > <a href="/">Home</a>
    > <a href="/calendar">Games</a>
    > <span style="float: right;">
    > <a href="/edit">Profile</a>
    > <a href="/tree">User</a>
    > </span>
    > </div>
    >
    > The span that contains the style="float: right;" should position it to
    > the right of the div? The span is actually positioned right
    > underneath the div. I don't see why?


    Try this:
    <div>
    <span style="float: right;">
    <a href="/edit">Profile</a>
    <a href="/tree">User</a>
    </span>
    <a href="/">Home</a>
    <a href="/calendar">Games</a>
    </div>

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Dec 17, 2007
    #2
    1. Advertising

  3. Tarscher

    Tarscher Guest

    On 17 dec, 18:58, "Beauregard T. Shagnasty"
    <> wrote:
    > Tarscher wrote:
    > > I have a menu and want some items to appear on the left side, others
    > > on the right side of the menubar.

    >
    > > I try
    > > <div>
    > > <a href="/">Home</a>
    > > <a href="/calendar">Games</a>
    > > <span style="float: right;">
    > > <a href="/edit">Profile</a>
    > > <a href="/tree">User</a>
    > > </span>
    > > </div>

    >
    > > The span that contains the style="float: right;" should position it to
    > > the right of the div? The span is actually positioned right
    > > underneath the div. I don't see why?

    >
    > Try this:
    > <div>
    > <span style="float: right;">
    > <a href="/edit">Profile</a>
    > <a href="/tree">User</a>
    > </span>
    > <a href="/">Home</a>
    > <a href="/calendar">Games</a>
    > </div>
    >
    > --
    > -bts
    > -Motorcycles defy gravity; cars just suck


    Many thanks
     
    Tarscher, Dec 18, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    496
  2. Roy Schestowitz
    Replies:
    1
    Views:
    670
  3. Replies:
    2
    Views:
    466
    Roderik
    Aug 3, 2008
  4. Oran
    Replies:
    2
    Views:
    550
  5. Replies:
    2
    Views:
    88
    Thomas 'PointedEars' Lahn
    Jul 29, 2008
Loading...

Share This Page