-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude IE6 and Below in code #14
Comments
Hi djamell, I'll look into it for the next release. In the meantime, I'd recommend that you use jQuery to detect whether or not to use backstretch. Something like this:
|
Instead of that, might as well just use an IE 6 stylesheet: And then serve up that div ala #backstretch with some IE 6 specifics, such as {display: none;} |
I tried both techniques without success. But I'm not sure if I did it the correct way. Here is what I have now: HTML (Had to replace "<>" with "{}" to get it to display in this comment {--[if lte IE 6]} {div id="hideie6"} CSS (ie6.css) /------ CSS Document for IE6 and Below -----/ #hideie6 {display: none;} Please tell me what I'm doing wrong. |
You've got your conditional comments right, in the file ie6.css put: Backstretch creates a div it puts on the page with that ID, so target that and it'll go away:). Doing that will remove your need for any other javascript that targets IE, the CSS will do it for you. Here's an example of a site I did a few weeks back: It uses conditional comments for the CSS, like you, and links to: Which I've hidden the backstretch div on the first line. |
Ohhhhhh! I get it. Works like a champ. Thank you so much! |
You're welcome! |
I think this has been raised before so forgive me. I was looking for a way to prevent the script from running if the browser version was IE6 or older. Googling around I found references to javascript techniques that could do this, but I really don't want to hack on the code myself.
Is there a possibility that a browser or "feature" test could be inserted to stop the code from executing if the browser is IE6 or older?
Thanks in advance.
The text was updated successfully, but these errors were encountered: