What is the use of "element{visibility:hidden}" | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the use of "element{visibility:hidden}"

Why do you want to hide the content? than just dont write it right?

10th Oct 2016, 5:27 AM
Tom Post
Tom Post - avatar
3 Answers
+ 3
Well.. you could hide it at first and when the user interact with the page (maybe after pressing a button) you can make it appear using javascript...
10th Oct 2016, 5:52 AM
Nelson Urbina
Nelson Urbina - avatar
+ 1
to hide the content from reader of page, but actually it is there and still take the same space hidden content still affect the layout of page. we use visibility:hidden to give dynamic effect to page and element will appear on user input
10th Oct 2016, 1:34 PM
+ 1
elementX{ visibility: hidden; } code above hides the specified elementX, but that elementX will still take up the space as if it was not hidden from a normal flow..
11th Oct 2016, 11:58 PM
Livingstone David
Livingstone David - avatar