View Full Version : adding margin to second level of list

05-03-2010, 09:48 PM
I am having trouble adding a margin to the second level of a list shouldnt this work? everything in the list is a link

<style type="text/css">
.list li a{

font-family:Arial, Helvetica, sans-serif;

.list li a:hover {


.list ul li a{


05-03-2010, 09:56 PM
I think you might have got your selectors wrong, what does the HTML for this CSS look like?

As a random guess I think you might be needing something like:

.list li li a{} or .list li ul a{}

05-03-2010, 10:40 PM
you want

ul.list li ul li { } /*applied to second level LI */

this may help visualise it better

ul { background:red; }
ul li { margin-left:10px; background:blue;}
ul li ul { background:yellow; }
ul li ul li { margin-left:20px; background:green; }

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum