I have been using Microsoft Expression Web lately and I must say, whilst on the surface it doesn’t seem that special, once you start discovering the features, it has some pretty cool stuff.
Anyway .. onto the post. I decided that I needed to use all this expression goodness to re-build my site, add a bit of Ajax goodness and generally rebuild into an XHTML1.1 table less layout with a low footprint. All was fine until my navigation was not centering on the page, and everything else was. Hmm… a bit of digging suggested that I should use
text-align:center
in the CSS. I made the change and all was good in the world. Then the tester in me stepped in … what about Firefox and Safari? Low and behold, they were not working as expected. After a quick search, it appears that because a DIV is not a block level element, Safari and Firefox are technically correct in not obeying the text-align. So to make this work with an XHTML 1.1 transitional doctype cross all 3 browsers you need:
margin: 0 auto;text-align:left;width: 780px;
If you don’t specify the width, it won’t work and IE will render it on the left of the page.




