Select Chapter ❯
CSS Tutorial
- CSS Introduction
- CSS Syntax
- CSS Insert CSS
- CSS Backgrounds
- CSS Text
- CSS Dimensions
- CSS Border
- CSS Margin
- CSS Padding
- CSS Display
- CSS Positioning
- CSS Float
- CSS Pseudo-Class
- CSS Opacity
- CSS Media Types
CSS3 Tutorial
CSS Display and Visibility
CSS Display property is used to specify how element is displayed.And CSS Visibility is used to show or hide an element
Example of Display
li { display:inline; }
Display Values
- display:inline; is used to make elements displayed in a single line
- display:block; is used to make elements displayed one in a line that is it takes full width available
- display:none; is used to hide the elements and it will not take any spaces.
Example of Visibility
li { visibility:hidden; }
Visibility Values
- visibility:hidden; is used to hide elements but it will take same spaces as before.
- visibility:visible; is used to show the elements
- visibility:collapse; is used only with dynamic table columns and row effects.