Is it safe to use the css property "visibility"? Will it work in all major browsers?
The visibility CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a <table> .
visibility: hidden - this CSS property makes the text invisible, but the space allocated for it will remain. In other words, the element is hidden from view but not the page flow.
visibility: hidden and assistive technology When we apply visibility: hidden to an element, it also removes it from the accessibility tree, which makes it invisible to technologies like screen readers.
The visibility property specifies whether or not an element is visible. Tip: Hidden elements take up space on the page. Use the display property to both hide and remove an element from the document layout!
According to W3Schools it's supported in all major browsers.
Please consider if you are actually looking to use visibility
as the element will still take up space on the page (it will just appear blank). If you want it to be as if the element isn't on the page at all then consider using display:none
instead.
according to http://www.w3schools.com/css/pr_class_visibility.asp yes:
The visibility property is supported in all major browsers.
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