Is it possible to detect Firefox Browser only with CSS like IE?
for example, IE browser can be detected like:
<!--[if IE 7]> /* IMPORTING CSS FOR IE */ <![endif]-->
Can be Firefox browser detected like this code?
The closest you can come with pure CSS is with feature queries. Instead of detecting the browser type/version, it allows you to check if a specific property/value combinations are supported by the browser. And, of course, IE does not support "supports," which I need to use solely for IE.
Any CSS at-rule that starts with @-moz- is a Gecko-engine-specific rule, not a standard rule. That is, it is a Mozilla-specific extension. The url-prefix rule applies the contained style rules to any page whose URL starts with it.
Method 1: This method uses Mozilla specific extension to add CSS property. This extension supply the CSS property only in Firefox browser. Method 2: The -moz-appearance CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme.
Not that I know of, but you can try this:
@-moz-document url-prefix() { #my-id { font-size: 100%; } }
This website has more options as well
You can place this in your CSS file or between your <style type='text/css'>
tags in your HTML. Works Fine!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With