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?
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 Mozilla Developer Network states this is explicitly supported just for browser detection:
@-moz-document url-prefix() { #my-id { font-size: 100%; } } See the Firefox note in @document § browser compatibility, which states FF 61+ "only supports an empty url-prefix() value, which is supported due to its use in Firefox browser detection. Still supported in user stylesheets."
Place this in your CSS file or between your <style type='text/css'> tags in your HTML.
@supports not( -moz-appearance:none ){ /* Add non-firefox CSS code here */ } orient looks among the best, as in @supports not (-moz-orient: block) { .firefox-only { display: none } }, but the other answer here is actually ~officially supported.