Pages

Sunday, November 28, 2010

css nav

Style the Navigation list


A list is used for navigation because it is good semantics.

The list is wrapped with a div with appropriate id:


Style the list, first remove the default style (bullets)

#nav ul{

list-style:none;

}

then give the list items a bottom border

#nav li{

border-bottom: 1px dotted #B2BCC6;

}

then style the link as display:block (instead of the default inline, see ).

#nav a{

display:block;

}

No comments:

Post a Comment