Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- li class to control images


Paul_o_b - 7:15 am on Sep 23, 2011 (gmt 0)


Hi,

You didn't mention what the problem was as the above code should work for you.

You dont need to repeat all the same styles though for each item. Do it more succincntly like this:


.col5{
float:left;
margin-left:28px;
}
.col5 ul{
list-style-type:none;
padding:0;
margin:0;
}
.col5 li{
background:url(images/gold.png) no-repeat 0 0;
width:125px;
height:35px;
text-align:center;
padding:10px 0 0 0;
margin:0 0 15px 0;
}
li.gold{background-image:url(images/gold.png);}/* don't really need this first one as we have already applied it above*/
li.blue{background-image:url(images/blue.png);}
li.red{background-image:url(images/red.png);}
li.yellow{background-image:url(images/yellow.png);}
li.green{background-image:url(images/green.png);}


Thread source:: http://www.webmasterworld.com/css/4366165.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com