hey i want to know what is the best way to make a css compatible with ie and firefox ; use ''em'' instead ''px'' ...... Thanks
code properly? Honestly, if you code CSS properly then you have full control over everything (although you still might need to do extra for ie6, i.e. a ie hack or whatever people call them). I've never had problems getting code to work the way it should (although sometimes it does take a while to figure out why it's acting weird in a browser or something, but I always get there in the end).
As to agree with the others above, now that I have mastered CSS and XHTML, I rarely need any hack for CSS. Coding valid code make you happier. Good Luck!
Altho to become a better coder you need to know about the bugs that happen... A small list can be found here of differences between ie7 and ie6 http://blogs.msdn.com/ie/archive/2006/08/22/712830.aspx I'm sure there are better resources out there tho
Using EM vs PX values doesn't really help with Firefox/Internet Explorer compatibility issues; it's simply a different want to handle resizing. It's better to use EM values than PX since they scale properly for people with lower eyesight who need to resize text. As far as the compatibility issue is concerned, your best bet is to start using a Reset stylesheet (I like Eric Meyer's) and then tackling the remaining issues one by one as you encounter them. I'd suggest you read up on the difference in Box Models to get you started, since it's one of the biggest problems you'll encounter but unfortunately, there is no single way to achieve perfect compliance easily. It's all in the way you code. You'll pick it up over time and learn to code with the differences in mind.