|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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- |
|
#2
|
||||
|
||||
|
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> |
|
#3
|
|||
|
|||
|
yea that works BUT it doesn't keep the font style ???
|
|
#4
|
||||
|
||||
|
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> |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS help - align text right |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|