Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
problems making drop down menus closer together
Old 07-15-2009, 04:19 PM problems making drop down menus closer together
Experienced Talker

Posts: 40
Trades: 0
Hi,

Av been following this guide http://www.htmldog.com/articles/suck...le/bones1.html

I have followed everything and got it the way I want except the main links are too far apart. am not sure how to make them closer..

www.leehughes.co.uk

Code:
body {
    font-family: arial, helvetica, serif;
}

#nav, #nav ul { /* all lists */
    padding: 0;
    margin: 0;
    list-style: none;
    line-height: 1;
}

#nav a {
    display: block;
    width: 10em;
}

#nav li { /* all list items */
    float: right;
    width: 10em; /* width needed or else Opera goes nuts */
}

#nav li ul { /* second-level lists */
    position: absolute;
    background: black;
    width: 10em;
    left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
}

#nav li:hover ul, #nav li.sfhover ul { /* lists nested under hovered list items */
    left: auto;
}

#content {
    clear: left;
    color: #ccc;
}
Is there also a way to space out the links in the drop down menus?

Thanks
leehughes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-17-2009, 09:02 AM Re: problems making drop down menus closer together
StylaStyla's Avatar
Mad Man

Posts: 401
Name: Styla
Location: City of London
Trades: 0
List looks fine in terms of spacing nevertheless;

Code:
edit the red text; change it to 8em or something
#nav li { /* all list items */
    float: right;
    width: 10em; /* width needed or else Opera goes nuts */
as for spacing out second level items (I'm assuming spacing in terms of height)

Code:
#nav li ul { /* second-level lists */
    position: absolute;
    background: black;
    width: 10em;
    left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
add
Code:
padding-top: **px;
replacing ** with a value of your choice, try maybe 3px..
StylaStyla is offline
Reply With Quote
View Public Profile Visit StylaStyla's homepage!
 
Reply     « Reply to problems making drop down menus closer together
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34277 seconds with 12 queries