DIV Layers and alignment question...

For browsers that comply with CSSP2, apply style rules like the following:

position : absolute;
width : 200px; (or whatever)
right : 0px;

Gecko-based browsers and Safari deal with this just fine. IE does not.

For IE you need to screw around with text-align:right and/or table hacks.

hth,
bear
 
My previous reply assumes that it's the div itself that you want to align. If what you really want is to align the text within the div to the right (which will span the width of the page by default), then "text-align:right" will do the trick.

bear
 
No, that is an old pre-CSS command. One thing that I really miss in CSS is that although it has a valign command, there is no align one. I guess float sorta does the same thing, but not quite...
 
Bootedbear, that works a treat... kicking myself that I'd missed this!! using the right parameter justifies the div to the right of the browsers window. Greeeaatt! Thanks.

dlloyd, you mentioned the valign in CSS, however, the middle valign is yet to be implemented in browsers, does anyone know a way to align vertically in a div, to the middle? At present I've used the padding.
 
Back
Top