Horizontal Navigation Bar
There are two ways to create a horizontal navigation bar. Using inline or floating list items.
Both methods work fine, but if you want the links to be the same size, you have to use the floating method.
Inline List Items
One way to build a horizontal navigation bar is to specify the <li> elements as inline, in addition to the "standard" code above:
Example
li
{
display:inline;
}
{
display:inline;
}
Example explained:
- display:inline; - By default, <li> elements are block elements. Here, we remove the line breaks before and after each list item, to display them on one line.
-
Other TopicsCSS : MEDIA,CSS::STYLING FORMS, mechanical Engineering, English books,Photoshop tutorials,Harry potter,Best 100 english books,Mechanical-old-question-paper,STYLE HTML ELEMENTS WITH SPECIFIC ATTRIBUTES,CSS : HORIZONTAL NAVIGATION BAR,CSS : FLOATING LIST ITEMS,CSS : IMAGE GALLERY,CSS : NAVIGATION BARS,CSS : VERTICAL NAVIGATION BAR,CSS : LIST OF CSS PSEUDO CLASSES
No comments:
Post a Comment