...

View Full Version : Help with CSS for dropdown menu



mikenap
08-09-2012, 11:42 PM
Hi all,

I've got this simple javascript dropdown menu,
http://www.oneeightyone.com/new/nav.htm

and I'm having two issues. One is that I'd like the list items to have some padding on the left, so that they are not overlapping the arrows. I've tried adding 'padding-left' to every style and I still can't seem to make it look right.

I'm also trying to get rid of the dashed line for each of the last list items. I've tried applying the ':last-child' attribute to what I thought was the right style, but I get nothing.

Any help is appreciated

AndrewGSW
08-09-2012, 11:59 PM
Try adding the padding here:


.dropmenu li ul li a{
width: 250px;
display: block;
/* border:1px solid #CCCCCC; */
border-top: none;

padding-left: 30px;
}

and modify to this:


.dropmenu li ul li a:last-child {
background-image: none;
}

mikenap
08-10-2012, 12:23 AM
thanks! The padding tip worked perfectly. Still having problems with that last-child style though...

AndrewGSW
08-10-2012, 12:42 AM
thanks! The padding tip worked perfectly. Still having problems with that last-child style though...

Add or modify the code I gave in the same order, preferably adding it to the existing css rules for these elements. If there is code further down that references the same element(s) then it will overrule this css.

mikenap
08-10-2012, 03:11 PM
Ah, seems like I had a typo in my code for that. Got it all working now. Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum