Originally posted by: screw3d
Originally posted by: notfred
<style type="text/css">
#right{text-align: right;}
</style>
<div id="right"></div>
text-align is not meant for aligning block elements, but more for aligning text much like what you do in Word (left, right, justify etc). text-align to align blocks probably only works in IE, but not on standards-compliant browsers. I think there really isn't a one-line code to do this for block elements yet, but code to ease layout is in the works for CSS3.
You should also name your divs according to the content, not the layout. eg. <div id="navigation"> instead of <div id="left">, <span class="highlight"> instead of <span class="blue">. Not super great examples but you get the idea.
Make sure you get your doctypes right, and
make sure that IE is rendering in
standards mode instead of
quirks mode. It is very important to keep your layout consistent across different browsers. I'm saying this because IE has this "feature" where if you have a XML prolog right before the doctype, it will render the page in quirks mode.