* The display property allows us to manipulate the type of box an element generates.
* We can use the display property to create a menu system by changing the list elements from block elements to inline elements.
* We do this by adding the rule: #nav li {display:inline;}
* Not only will the elements now be listed horizontally not vertically, the majority of browsers also remove the numbers that denote the positions in the list (if using an ordered list).
* To ensure this is done by ALL browsers, add in the rule list-style:none;
* We can also force inline elements to display as block elements, eg. b {display:block;}
* NB: The element has not changed from being an inline element to a block element, it has just changed its BEHAVIOUR.
* {display:none;} is a very handy rule for a variety of reasons:
1. to create menu systems (see above)
2. for pop ups
3. to hide elements on the screen that you want to appear when the page is printed.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment