Jump to content


Photo

Two alignments on a single line (Left and Right)


  • Please log in to reply
1 reply to this topic

#1 FrOzeN

FrOzeN
  • Members
  • PipPipPip
  • Advanced Member
  • 70 posts

Posted 10 October 2006 - 09:58 AM

How can I make it so two things (preferably divs or spans) sit on one line relative to where they are in the page.

I'm trying to do this without the use of tables. With tables the code would look as follows:
...

  <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
      <td>Item 1</td>
      <td align="right">Item 2</td>
    </tr>
  </table>

...

[EDIT] Nvm, fiqured it out after a bit of playing around.

Result:
<div style="float: left;">Item 1</div>
<div style="text-align: right;">Item 2</div>


#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 10 October 2006 - 10:38 AM

float one left and the other right.
follow me on twitter @PHPsycho




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users