1

IE doesn't support CSS3 columns. I want to use a jQuery columnizer in IE and CSS3 in all other browsers. How can I do this?

3 Answers 3

2

You should include a conditional script in your page

<!--[if IE]>
<script type="text/javascript">
// script for IE
</script>
<![endif]-->

You can also target different versions of IE with this method

http://www.quirksmode.org/css/condcom.html

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. Going with if($.browser.msie).
I should probably also mention the use of the if condition allows you to include different stylesheets as well, such as a CSS2 stylesheet for earlier versions of IE if you need to, just wrap the statement for including the css in your head with the if statement. There are also slight performance benefits to not using javascript to detect the browser version and execute some code conditionally. Chrome or Firefox won't even download the script file that contains your IE code.
1

You can try CSS3 & HTML5 feature detection using modernizr and do conditional resource loading. It's more powerful than browser sniffin'.

Comments

1

you can detect the browser then apply the jquery http://api.jquery.com/jQuery.browser/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.