These are my legal CSS Hacks for fixing web browser quirks or outright bugs. Please enjoy, I have been working on them for years. May it help you if you need them. Please read here first: [What are these CSS Hacks Anyway?] Then check my [Live CSS Hacks Test Page] and also [BrowserHacks.com] where I sent new hacks and test submissions for the site.
GENERAL DISCLAIMER – In case you haven’t read my other blogs, CSS hacks are just quickfixes to solve web browser problems for developers. It is always better to use good cross-browser CSS first, and use these as a last resort.
I worked with hundreds of different permutations and these are the best I have found for this purpose yet.
/* Firefox (All Versions) */ _:-moz-tree-row(hover), .selector { property:value; }
Another one I made a while back:
/* Firefox (All Versions) */ _:-moz-any-link, :root .selector { property:value; }
…And the reverse — Rule out Firefox:
/* (Anything but Firefox, and Internet Explorer 8-) */ _::selection, :root .selector { property:value; }
My previous [less ‘pretty’] version:
/* (Anything but Firefox, and Internet Explorer 8-) */ _::selection, .selector:not([attr*='']) { property:value; }
This ‘anything but’ hack is CSS3 based, hence the lack of support for Internet Explorer 8. Both of these I added to BrowserHacks.com.
Reblogged this on sonofbluerobot.
LikeLike
[…] Source: CSS Hacks to Detect or Rule Out Firefox (Any Version) […]
LikeLike