View Single Post
Old 05-28-2009, 01:32 PM  
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
Quote:
Originally Posted by malkishooa View Post
use W3C's html and css validation tools and you should be find.
you need to follow the CSS 2 and HTML 4.01 standards and than most of the times the site will appear fine on every browser.
WRONG

IE isn't standard compliant, so just work your nifty beautiful page with w3 standards...

and then get ready to work in the IE version (btw, not 1, but 2 at least since IE6 isn't the same as IE7 and none of them are the same to IE8)

Either way, as a rule of thumb set all margins and paddings at 0 in the beginning of your style shit. If your page isn't very complex, and sizes don't need to be exact, then remember that IE will add 2 pixels (width and height) to any div by default. So if the real width of a div is 200px in IE it will be 202px. If you're floating or nesting divs, you'll need to keep that in mind, sustract borders, margins and paddings to make everything be in place. To make things worse, padding behavior is very different across different IE versions. When they got close (but not cigar) with IE7 they changed it again in IE8. Same goes for margins.

Sad thing is that you can't ignore IE, like it or not.
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote