My Thoughts & Views

Difference between Visibility & Display in CSS

Posted on: December 27, 2007

CSS has two properties for hiding the contents. Those are

1. Visibility
values: inherit visible hidden ;
2. Display
values: block none inline list-item ;

Both Visibility and Hidden are used to hide the information, but when you use Visibility to hide, browser still takes up the space in layout and displays blank space.

Whereas if you use Display to hide the information, browser will removes the element completely from the document and it doesn’t show any blank space in that location, even though the HTMl for it is still in the source.

Use : Using these properties you can create effects of collapsible panel.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: