CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 2nd, 2004, 03:12 PM
Eternal Student Eternal Student is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 200 Eternal Student User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
CSS help - align text right

OK I have a layer that is described here :


div#footer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height:14;
background-color: #EED;
font: 10px Verdana, sans-serif;}


In this layer I wish to have some text in the left of the bar and at the far right (align-right) some text also ... how would i achieve this ???

-Thanks-

Reply With Quote
  #2  
Old February 2nd, 2004, 04:31 PM
quelle's Avatar
quelle quelle is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Calgary, AB
Posts: 152 quelle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 14 sec
Reputation Power: 6
use the text-align property:

Code:
<div id="footer">
	<div style="text-align:left">Left-aligned Text</div>
	<div style="text-align:right">Right-aligned Text</div>
</div>


or personally I'd use:
Code:
<div id="footer">
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="text-align:left">Left-aligned text</td>
			<td style="text-align:right">Right-aligned text</td>
		</tr>
	</table>
</div>

Reply With Quote
  #3  
Old February 2nd, 2004, 04:46 PM
Eternal Student Eternal Student is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 200 Eternal Student User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
yea that works BUT it doesn't keep the font style ???

Reply With Quote
  #4  
Old February 2nd, 2004, 06:34 PM
quelle's Avatar
quelle quelle is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Calgary, AB
Posts: 152 quelle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 14 sec
Reputation Power: 6
add two more styles:

#footer_left {
text-align:left;
font-size: 10px;
font-family: verdana;
}

#footer_right {
text-align:right;
font-size: 10px;
font-family: verdana;
}


and update your html to:
Code:
<div id="footer">
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td id="footer_left">Left-aligned text</td>
		<td id="footer_right">Right-aligned text</td>
	</tr>
</table>
</div>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS help - align text right


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT