[HTML/CSS] Need help aligning stuff

Discussion in 'Web Design & Coding' started by Glaanieboy, Jul 25, 2004.

  1. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    add
    Code:
    text-align: right;
    to .posted{} ?
     
  3. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Nope, that moves the whole text to the right. I only want the button to be moved. Maybe this is easier:
    CSS:
    Code:
     .newsitem {
       border-style:solid;
       border-top-style: none;
       border-color:#000000;
       border-width: 0pt 1pt 1pt 1pt;
     }
     .posted {
       font-weight: 600;
       background-color: #0a246a;
       color: #ffffff;
       width: 100%;
     }
     .comments {
       text-align: right;
       text-decoration: italic;
       font-size: 8pt;
     }
    HTML:
    Code:
    <td class="newsitem"><div class="posted">Posted at date<img src="images/up.png" alt="Go to top" title="Go to top" style="text-align:right;"></div>test post
    <div class="comments" style="text-align: right;"><i>x</i> comments</div></td>
    More clear now?
     
  4. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Ah sorry, I misread. You'd need another div/cell/container to split the text and button from each other then. :)
     
  5. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Well, I temp solved it by placing the button elsewhere, as you can see here. This hasn't got priority now.