PDA

View Full Version : Internet explorer 6 - CSS


Sofia
07-24-2009, 12:42 PM
Hello all.

Is there a way to have a template conditional for Internet Explorer 6 ?

I find this in the headinclude template:

<if condition="is_browser('opera') AND !is_browser('opera', '8.0.1')">
<style type="text/css" id="vbulletin_opera8fix_css">
ul, ol { padding-$stylevar[left]:20px; }
</style>
I want to use CSS but with IE6, these CSS class don't work.
I want to include in my headinclude template special css class to use with IE6 (like above for opera 8).

Thanks! :)

Wayne Luke
07-24-2009, 01:30 PM
The easiest way to do this is to use what Microsoft calls "Conditional Comments". Internet Explorer is the only browser to use these constructs.


<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->


If the user is using IE6 than it will include everything in the comment when processing the page.

You could also do something like:

<!--[if lt IE 7]>
Special instructions for IE 6 and earlier here
<![endif]-->


Doing a search on conditional comments will give more tutorials.

Sofia
07-24-2009, 02:28 PM
Ok, thank you Wayne ;)