Align text 2 ways on a single line

Discussion in 'CSS' started by Josh Inno, Apr 3, 2007.

  1. #1
    Hey there. I'm trying to figure out how to align 2 bits of text on a single line inside of a list element, and I'd prefer to keep the text in semantic order if possible.

    I've got a list of membership types, and the cost to join on the same line. I'd like to have the membership types aligned left, and the membership costs, which come after them, aligned right. I've tried a span surrounding the cost, and giving it the style of text-align: right, but that doesn't seem to work. And if I try to introduce a float to the right hand side, it breaks the line.

    The page is at Join LIBA (Beta)
     
    Josh Inno, Apr 3, 2007 IP
  2. Josh Inno

    Josh Inno Guest

    Messages:
    1,623
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well I think I've got the alignment on the same line down, I just had to float the membership section left, the price information right, and then clear on the next li or the following information... but now the problem has become how to get some kind of margin after the li.
     
    Josh Inno, Apr 3, 2007 IP
  3. Josh Inno

    Josh Inno Guest

    Messages:
    1,623
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry about that, I got that bit solved as well. Thank you.
     
    Josh Inno, Apr 3, 2007 IP