Hide something using CSS













These two style properties do two different things.


Visibility: hidden - hides the element, but it still takes up space in the layout. it will act like it's still there

 h1 {  
   color: orange;  
   text-align: center;  
   visibility: hidden;  
 }  

Display: none - removes the element completely from the document.  it will be displayed as  the element is not there

 h1 {  
   color: orange;  
   text-align: center;  
   display: none;  
 }  

Hide something using CSS Hide something using  CSS Reviewed by Unknown on 11:07 PM Rating: 5

No comments:

Powered by Blogger.