left justify drop down buttons

Why am I not seeing this - I need to add some left margin/padding to drop downs to this very old site.  When I add padding or margin to the below element it messes it up

#navigation li:hover ul, #navigation li.sfhover ul { /* lists nested under hovered list items */

Who is Participating?
Chris StanyonConnect With a Mentor Commented:
you can't declare an hover and continue to target a different element
You can ;)

#navigation li:hover ul { border: 1px solid green; }

This will set the style for the child UL when the parent LI is hovered on.

If you want to move the whole sub-menu across, just change the left property:

#navigation li:hover ul, #navigation li.sfhover ul {
    left: 20px;

Open in new window

If you want to create a left padding within the submenu, then you'll need a new rule to set the left padding of the A tags only in a submenu:

Make sure this rule comes after line 113 of your stylesheet!

#navigation ul li ul a:link {
    padding-left: 20px;

Open in new window

Your css is wrong, you can't declare an hover and continue to target a different element
Not sure what you want to do
Try something like
#nav ul li a {padding:5px}

and remove the padding from
#navigation a:link, #navigation a:visited
if you mean the submenu elements then the problem is on the a element

#navigation a:link, #navigation a:visited {

In project.css has the padding set to 0;

nsitedesignsAuthor Commented:
All I wanted to do was add padding to submenus.  Chris provided the easiest solution.  Thanks alL!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.