Body text-align center wont centre your page, at all, it will centre your text, then your container with text align right will right align your text, if everything is contained within your container, the centre alignment will be redundant.
Margin:0 auto; with defined width on container will centre your page.
(as long as its not absolutely positioned!)
Yes, but only works in < ie7.
So I'm trying to do a website right now, and it looks good on IE but not Mozilla. I am using margins with negative, like : margin-top:-6px
Is there a list of things to know that will/wont work with browsers? Is there a way to do CSS so that all browsers will look the same?
I tend to believe if you have to use negative values for positioning then most likely you aren't coding correctly. Meaning there is usually underlining reason such as default formatting/values getting in the way.
Even if you are avoiding html5, for some reason, this site is a great one to get an idea of a lot of tips and tricks that designers have come up with to overcome differences across browsers.
http://html5boilerplate.com/
Hope that firehose helps.
Gotta disagree, though I grasp what you're trying to say. If you're doing it because things aren't lining up, then yeah, you're wrong, but if you're doing it to intentionally shift something out of its normal boundaries...
Body text-align center wont centre your page, at all, it will centre your text, then your container with text align right will right align your text, if everything is contained within your container, the centre alignment will be redundant.
Margin:0 auto; with defined width on container will centre your page.
(as long as its not absolutely positioned!)