Ie8 css selector hack


















Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. See info below. IE10 Only. Method 1: UA Sniffing, which isn't the most loved method to target browsers, but here it is anyway.

David Murdoch Nick B Nick B 7, 2 2 gold badges 31 31 silver badges 28 28 bronze badges. How can I target IE8 only? This also matches IE10, IE11, and probably future versions. Original answer: Some people seem to be confused because this does not answer the letter of the question, only the spirit - so for clarification: There is no such thing as a browser selector. There is a standard, accepted way to deal with this: Use conditional comments to target IE only. Rex M Rex M k 30 30 gold badges silver badges bronze badges.

I'd go so far as to say "Use conditional comments to target any version s of IE". I guess your conditional statements do the trick, though this doesn't really answer the question by Chris who wants to know of a selector to address IE8 only — Michiel. A little late, but this was not the question ; It is not about conditional comments, but about a CSS selector. I think everyone around here knows that those are around, and the selectors are the thing that are difficult to find.

I don't think hacky code precludes the better code. It's not the fault of the dev that hacks are needed to deal with unwieldy and legacy platforms without pulling one's hair out--I'll gladly take the scornful gazes that come with hacky presentational code so long as it displays properly in everything I can throw at it, especially considering most people who will be viewing it don't even really know what html is..

Show 12 more comments. Gumbo Gumbo k gold badges silver badges bronze badges. It only targets IE7 and IE 6 if you add the semicolon ';' to the end of the line — kflorence. I needed this solely for IE8 — BBog. This question is ancient but.. Right after the opening body tag.. I saw something similar on the jqueryui themeroller demo jqueryui. Working on a major rewrite now, and using this for my IE specific code Though I still need scripts to apply additional styles since IE6 doesn't have attribute selectors.

You can use just the selector library itself from here or it is also the selector library inside of jQuery. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 9 years, 3 months ago. Active 6 years, 1 month ago. Viewed 5k times. I've used :before and :after with jQuery. If not, extending jQuery shouldn't be too difficult. Does Google Chrome Frame cover this territory?

No, I wouldn't ever want users to have to download something in order to use the site. Add a comment. Active Oldest Votes.

Just making sure, but this will work for ie8? I designed the site in Dreamweaver. I have got to get the spry menubar to stay in the correct space, drop down to work in IE and fix my floats. The 3 px bug is the problem I think. I have never had this problem before. Any advice would be appreciated.

Thank you. But you need to do a few things:. You have a section of CSS that looks like this:. That might not be causing the problem. From what I can tell, the problem is caused by the Spry menu script, because it seems to happen when the script is triggered.

Good read! Bookmarked for sure! Conditional Complication is not a hack its a native feature of Internet Explorer. Comment Rules: Please use a real name or alias. Keywords are not allowed in the "name" field and deep URLs are not allowed in the "Website" field.

No foul language, please. Thank you for cooperating. Markdown in use! You can also indent a code block four spaces. And no need to escape HTML, just type it correctly but make sure it's inside code delimeters backticks or triple backticks.

Notify me of followup comments via e-mail. You can also subscribe without commenting. Anthony says:. November 3, at am. Louis Lazaris says:. November 3, at pm.

Gunnar Bittersmann says:. June 26, at pm. Gary says:. Scott Vivian says:. Qbin says:. November 4, at am. November 4, at pm. Lukas says:. November 5, at am. November 8, at pm. IamHeff says:. November 18, at am. Mark Kenny says:. November 5, at pm. November 10, at am. Thierry Koblentz says:. November 18, at pm.



0コメント

  • 1000 / 1000