homepage Welcome to WebmasterWorld Guest from 54.198.148.191
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

    
Different Alignment in one row without tables is it possible?
Using it for a Prev, Next
graywolf




msg:1198882
 4:05 pm on Mar 11, 2003 (gmt 0)

I am trying to get a some text left justified and right justified on the same line. If I were doing it in a table it would be like this



<table width='100%' >
<tr>
<td align='left'>Left</td>
<td align='right'>Right</td>
</tr>
</table>

I tried this but it didn't work



<style type="text/css">
left1 {text-align: center}
right1 {text-align: right}
</style>
<div>
<span class='left1'>Left</span>
<span class='right1'>Right</span>
</div>

I tried playing with it a little and didn't get it to look any better, anyone have any suggestions?

 

dingman




msg:1198883
 4:16 pm on Mar 11, 2003 (gmt 0)

How about

<style type="text/css">
#left {
text-align: left;
}
#right {
float: right;
text-align: right;
}
</style>
<div id="left">
This is left-justified
</div>
<div id="right">
Ths is right-justified
</div>

Substitude classes instead of IDs if it fits your actual code better, of course.

Untested code, but I did something much like this Monday night so it shouldn't be too far off.

graywolf




msg:1198884
 4:31 pm on Mar 11, 2003 (gmt 0)

Worked perfectly thanks!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved