Jump to content

Differnt Padding For Ie


son

Recommended Posts

a) IE hackb) Conditional commentsBut first make sure you're not running in quirks mode.Edit: and as TS said, try a reset stylesheet as well. It could also be the margins affecting the result.

Link to comment
Share on other sites

you could just give everything a zero padding using the universal selector and then just apply those kind of things for each element as needed. But yes, certain browsers have their own default element paddings.

Link to comment
Share on other sites

I was reading about the padding trick with IE in an article about column based layouts in css, basically if you use padding in IE, it messes up sometimes, so you use div containers, and it should work. Also if you are using CSS make sure you have the strict doctype with your XHTML if you really want it to work, if its transitional or loose or HTML , IE will slip in to its own rendering, the strict DOCTYPE helps to to force it to work.

Link to comment
Share on other sites

I have now the general padding in global stylesheet (works with latest versions of Firefox, Safari, Opera, Chrome) and add for IE (I verified for IE 7):

<!--[if IE]><style type="text/css">.box {padding:0 2px 2px 0;}</style>

Does anyone nowadays still bother with IE6? I always did, but now I am not sure if I should do a final test when project is finalised for IE6...Son

Link to comment
Share on other sites

Actually, it is always best to use a Strict Doctype, especially when working with wonky browsers, like IE. Standards are there for a reason, and a strict DTD will help ensure the browser follows the rules more.

Link to comment
Share on other sites

Actually, it is always best to use a Strict Doctype, especially when working with wonky browsers, like IE. Standards are there for a reason, and a strict DTD will help ensure the browser follows the rules more.
Thanks for your feedback...Son
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...