CSS Beginners Guide part 9 - Visible and Display Elements | Lessoncup Programming Blog

Thursday, 31 October 2013

CSS Beginners Guide part 9 - Visible and Display Elements

CSS providing display property to specify the html elements to be display and visible property allows you to visible and hidden the html elements, there is lot of difference in both, if you use display property to hide the elements it will hide the element and it will not take any kind of space, if you use visible property to hide the elements it will hide the element but it will take the space and appear like to be some layer is placed.

Hiding Elements

we can use none value to display property to hide the elements, use hidden value to visibility property to hide the elements
ex:
<style>

div{

display:none; // hide the elements

visibility:hidden; // hide the elements bit still take the element space which is in hidden mode

}

</style>

Elements disply

ex:
<style>

li{

display:inline; // set the list items into one line

/////

display:block; // set the individual elements to block elements

}

</style>

No comments :

Post a Comment

Mohammad Khasim
Blogger | Web Developer
Hyderabad - INDIA
lessoncup@gmail.com

PHP | My SQL | JQUERY
Web Development Tools | CMS | Frameworks | SEO

Get my Latest Lessons