Forum Moderators: not2easy

Message Too Old, No Replies

Multiple List Styles

         

ecomnewbie

8:12 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



I have a problem I was hoping somewhat might be able to answer. I have created a horizontal nav bar using CSS to style unordered list.

However, I want to use unorded lists in the site. So the question is how do I create multiple list styles. Here is the code I used for the horizontal nav bar.

ul {
margin: 0;
padding: 0;
float: left;
width: 720px;
background: #9C0029 url(images/mainNavBg.gif) repeat-x;
list-style: none;
text-transform: uppercase;
padding-left: 50px;
}

ul li {
float: left;
}

ul a {
padding: 0 2em;
line-height: 2.1em;
background: url(images/mainNavBorder.gif) repeat-y left top;
text-decoration: none;
color: #fff;
float: left;
display: block;
}

ul a:hover {
color: #333;
}

ul .first a {
background: none;
}

Thanks in Advance. You guys have always been great!

theenglishguy

11:54 am on Aug 12, 2006 (gmt 0)

10+ Year Member



The list you created for your navigation - add an id.


<ul id="navlist">

then in your css code just add #navlist before any ul { } entry, it will only affect the navigation unordered list.

Richard

ecomnewbie

5:13 pm on Aug 12, 2006 (gmt 0)

10+ Year Member



Thanks for the info!