| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Aligh left and align right on same line in same div
I have some CSS in a DIV that is aligned to the left I would like to add some text to the right of that DIV
I added a SPAN tag and a CLASS within that DIV and my text went onto the next line?! |
|
#2
|
|||
|
|||
|
Use the CSS property "float" to make your <span> align to the right. Just remember that you have to clear the float inside the <div> so that the rest of your page doesn't get pushed around.
|
|
#3
|
||||
|
||||
|
The basic idea... making this pretty in IE versus FF may require additional styling. Also, in the end, don't use inline CSS like I added here.
<div style="width200px;> <span style="float:right;width:50px;">Right</span> <span style="float:left;width:50px;">Left</span> </div>
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
|
![]() |
| Viewing: ASP Free Forums > Web Design > Web Layout > Aligh left and align right on same line in same div |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|