lining a few items up in a row

Discussion in 'HTML' started by rtconner, Apr 13, 2006.

  1. rtconner

    rtconner Guest

    What I'm trying to do is line several item up in one row (preferably
    within a LI). The first element *must* be a span tag (unless there
    really is no other way, then I have a lot of work to do) The
    second(through.. 4th?) element(s) can be anything. But I can promise
    there are always three blobs of text I'll have to put after the span in
    each row. They can be in one table with 3 td's or 3, divs.. I don't
    care. What I want though is the first element aligned on the left, and
    the next two aligned on the right.

    Here is a visual-

    Span Left Text Right Text
    * text1 right1 right2


    Anything that works in IE 6+, and latest Mozilla is fine.

    This code works in Mozilla, not IE.
    <ul>
    <li style="width:100%;background-color:#FFBBAA">
    <span>*</span>
    <table cellspacing="0" cellpadding="0" width="100%"
    style="display:inline">
    <tr>
    <td width="100%">
    aligned left
    </td>

    <td>
    right1
    </td>

    <td>
    right2
    </td>
    </tr>
    </table>
    </li>
    </ul>

    --
    Why am I trying to do this? It's weird but involves use of the mktree
    js library and requirements for building a tree to go into it. I
    thought this would be the easy part to do, but its not turning out that
    way.
    rtconner, Apr 13, 2006
    #1
    1. Advertising

  2. rtconner

    rtconner Guest

    for anyone who cares the answer is...
    put the divs *before* the span

    <div style="float:right;">Right Aligned1</div>
    <div style="float:right;">Right Aligned2</div>
    <span>This text is aligned left</span>

    rtconner wrote:
    > What I'm trying to do is line several item up in one row (preferably
    > within a LI). The first element *must* be a span tag (unless there
    > really is no other way, then I have a lot of work to do) The
    > second(through.. 4th?) element(s) can be anything. But I can promise
    > there are always three blobs of text I'll have to put after the span in
    > each row. They can be in one table with 3 td's or 3, divs.. I don't
    > care. What I want though is the first element aligned on the left, and
    > the next two aligned on the right.
    >
    > Here is a visual-
    >
    > Span Left Text Right Text
    > * text1 right1 right2
    >
    >
    > Anything that works in IE 6+, and latest Mozilla is fine.
    >
    > This code works in Mozilla, not IE.
    > <ul>
    > <li style="width:100%;background-color:#FFBBAA">
    > <span>*</span>
    > <table cellspacing="0" cellpadding="0" width="100%"
    > style="display:inline">
    > <tr>
    > <td width="100%">
    > aligned left
    > </td>
    >
    > <td>
    > right1
    > </td>
    >
    > <td>
    > right2
    > </td>
    > </tr>
    > </table>
    > </li>
    > </ul>
    >
    > --
    > Why am I trying to do this? It's weird but involves use of the mktree
    > js library and requirements for building a tree to go into it. I
    > thought this would be the easy part to do, but its not turning out that
    > way.
    rtconner, Apr 14, 2006
    #2
    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. RobM
    Replies:
    0
    Views:
    712
  2. Steve Pugh
    Replies:
    3
    Views:
    469
    Scott_From_PA
    Feb 11, 2005
  3. Lazaroo

    Lining up 'equals' signs

    Lazaroo, Mar 26, 2005, in forum: HTML
    Replies:
    3
    Views:
    464
    Lazaroo
    Mar 26, 2005
  4. tshad
    Replies:
    16
    Views:
    3,720
    tshad
    Apr 3, 2005
  5. Murali
    Replies:
    2
    Views:
    544
    Jerry Coffin
    Mar 9, 2006
Loading...

Share This Page