Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
The use of Visibility property is well explained in the CSS lesson and its assosciated comments ... You can Google for such non programming Questions and Pls use the search bar to find similar threads... https://www.sololearn.com/Discuss/243600/?ref=app https://www.sololearn.com/Discuss/510155/?ref=app
30th Nov 2020, 9:19 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 4
CSS's visibility property is simply for hiding and showing elements. You might wonder why have content at all if it is just going to be invisible. You'd be correct that content that is always hidden just shouldn't be in the HTML. You might want to have content hidden if it shows only some of the time, though. Think of features like a tabbed feature where content hides and shows based on an active tab. The hidden content can be useful if it might become visible at some point. Here is an example of a tab control: https://jqueryui.com/tabs/ The specific tab control above might be using display: none under the hood but that's another way to hide an element. display: none is slightly different from visibility: hidden because visibility: hidden still leaves space for the hidden content. display: none collapses all content around it as if the hidden content doesn't occupy any room. In other words, visibility: hidden can be like an invisible man in a room that keeps things pushed away while display: none is as if the man doesn't exist at all.
30th Nov 2020, 9:19 AM
Josh Greig
Josh Greig - avatar