Align Left Align Right and Align Center

Discussion in 'CSS' started by wd_2k6, Mar 21, 2008.

  1. #1
    Hi,
    I have 3 div's or spans you choose..
    I want them all in a line.. one aligned to the left, one aligned to the right, and one exactly in the middle?
    How can i do this? I don't want to set width 33%.
     
    wd_2k6, Mar 21, 2008 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Mmmm, give us more info of what it needs to do or look like. Why can't there be width: 33%?
     
    Stomme poes, Mar 21, 2008 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    
    <p id="footer">
      <span class="link"><a href="#top">Return to top of page</a></span>
      <span class="update">Last Update 21 Mar., 2008</span>
      &copy;2008-All rights reserved
    </p>
    ================
    #footer {
      text-align: center;
      }
    
    .link {
      float: left;
      text-align: left;
      }
    
    .update {
      float: right;
      text-align: right;
      }
    Code (markup):
    cheers,

    gary
     
    kk5st, Mar 21, 2008 IP
  4. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cheers Gary just what i was looking for!!
     
    wd_2k6, Mar 21, 2008 IP
  5. sks2120

    sks2120 Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    lol @ your sig gary. or could it be that maybe they prove that they dont in fact after all, know what theyre doing? :)
     
    sks2120, Mar 21, 2008 IP