homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

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

 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%' >
<td align='left'>Left</td>
<td align='right'>Right</td>

I tried this but it didn't work

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

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



 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;
<div id="left">
This is left-justified
<div id="right">
Ths is right-justified

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.


 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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved