+ 7

What's differences between visibility:hidden; and display:none; in CSS

31st May 2018, 2:36 PM
MOHAMED BURMA MOHAMED ABDALLA
MOHAMED BURMA MOHAMED ABDALLA - avatar
4 Antworten
+ 6
Hiding an element can be done by setting the display property to "none" or the visibility property to "hidden". However, notice that these two methods produce different results: visibility:hidden hides an element, but it will still take up the same space as before. The element will be hidden, but it will still affect the layout:
14th Jun 2018, 2:51 AM
lakhan vannal
lakhan vannal - avatar
+ 5
IF YOU HAVE THREE P TAG HAVING HELLO AS CONTENT AND IF YOU APPLY VIS..:HIDDEN TO SECOND TAG IT WILL BE DISPLAYED AS HELLO HELLO BUT IF YOU APPLY VIS..:NONE THAN IT WILL BE DISPLAYED AS HELLO HELLO
31st May 2018, 4:13 PM
Meet Mehta
Meet Mehta - avatar
+ 4
property visible hidden Occupies a place, and display: none does not.
1st Jun 2018, 3:42 PM
Sandu
Sandu - avatar
+ 3
display: none; completely strips an element from the page. This means that if you apply display: none to an element, it won’t appear on your website. visibility: hidden; simply hides an element from the page, while still rendering the tag in the viewport. This means that even though the element is invisible, there is still space allocated for it on the page.
31st May 2018, 3:26 PM
Cosmin P
Cosmin P - avatar