Jump to content

css ieonly


jimfog

Recommended Posts

Ok, there must be a separate css file applicable only for ie explorers since IE lower or equal than 6 have some problems with some css styling.So, when styling with css which properties(width....etc) i must be aware of that might cause appearance problems in IE6 and lower.I now that this is a big issue i am opening, nonetheless i need some help with it.Thanks.

Link to comment
Share on other sites

Ignore lower than 6. There's no payoff there.If you use a good doctype, the biggest problem is solved, and that is the old-fashioned box model. A good doctype can be strict or transitional, as long as it contains the URL portion, like this one:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">I know the new HTML5 doctype accomplishes the same in IE7. I think it also works in IE6, but I don't remember.Have you spent time with the compatibility tables at quirksmode? Great resource for these questions.

Link to comment
Share on other sites

Ignore lower than 6. There's no payoff there.If you use a good doctype, the biggest problem is solved, and that is the old-fashioned box model. A good doctype can be strict or transitional, as long as it contains the URL portion, like this one:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">I know the new HTML5 doctype accomplishes the same in IE7. I think it also works in IE6, but I don't remember.Have you spent time with the compatibility tables at quirksmode? Great resource for these questions.
Ok i ignore ie lower than 6.SHould i generally ignore IE(version higher than 6) or should i still make special css files for it or as you said just use the proper doctype?Thanks
Link to comment
Share on other sites

A lot of developers now ignore IE6. Those who don't typically work in an environment where special webapps were developed for corporations that require traditional Microsoft functionality. If that doesn't sound like you consider ignoring IE6.As a rule, experienced developers design for standards-compliant browsers (like Firefox) first and then tweak for IE.Almost everything you want to do with CSS in standards-compliant browsers can be done in IE without any special files that overwrite values set for the other browsers. You just need to tweak certain rules so that things work in IE without breaking your design for the others. Here are a few off the top of my head.You'll certainly want to reset padding and margins for all elements to 0 (if you're not already doing that).Problems with multiple floating elements can usually be fixed by tweaking clear and display properties.Nesting lists to create dropdown menus sometimes creates problems that can be solved by putting text in nested <p> elements.Almost the only time I am tempted to add special CSS for IE is when I use a "sticky footer." This is typical:

<!--[if IE]>	<style type="text/css">		body {			overflow-y: visible;			overflow-x: visible;		}	</style><![endif]-->

It's also pretty minimal.If you're having specific problems, ask. Someone on the board probably has a solution.

Link to comment
Share on other sites

A lot of developers now ignore IE6. Those who don't typically work in an environment where special webapps were developed for corporations that require traditional Microsoft functionality. If that doesn't sound like you consider ignoring IE6.As a rule, experienced developers design for standards-compliant browsers (like Firefox) first and then tweak for IE.Almost everything you want to do with CSS in standards-compliant browsers can be done in IE without any special files that overwrite values set for the other browsers. You just need to tweak certain rules so that things work in IE without breaking your design for the others. Here are a few off the top of my head.You'll certainly want to reset padding and margins for all elements to 0 (if you're not already doing that).Problems with multiple floating elements can usually be fixed by tweaking clear and display properties.Nesting lists to create dropdown menus sometimes creates problems that can be solved by putting text in nested <p> elements.Almost the only time I am tempted to add special CSS for IE is when I use a "sticky footer." This is typical:
<!--[if IE]>	<style type="text/css">		body {			overflow-y: visible;			overflow-x: visible;		}	</style><![endif]-->

It's also pretty minimal.If you're having specific problems, ask. Someone on the board probably has a solution.

My question was rather general. I do not have a specific problem now.But i am approaching a point in time(as the site construction moves on) where i will have to deal with this issue, when that happens i will come back.Anyway, thanks fro your help.
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...