Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 25th Mar 2011, 05:38 AM   #1
HyperActive Warrior
 
Join Date: 2008
Posts: 457
Thanks: 112
Thanked 7 Times in 7 Posts
Default
Add padding to suckerfish css menu
Share on: 
fb share twitter share gplus share more share

Hi,

I'm using the menu from here: Suckerfish Dropdowns - Three Level Bones.

However, when trying to add some padding, it seems to push the sub-menu down.
In the above example, if I move my mouse over Percoidai>Remoras (the first submenu in the first item), instead of showing 'Echeneis' next to 'Remoras' it pushes Echeneis down around 3 pixels, so there comes a spacing above this item.

Any ideas on how I can add some padding to this menu?

Thanks.

Best regards,
Thomas
ThomasTe is offline  
Unread 28th Mar 2011, 03:52 AM   #2
HyperActive Warrior
 
Join Date: 2008
Posts: 457
Thanks: 112
Thanked 7 Times in 7 Posts
Default
Re: Add padding to suckerfish css menu
Share on: 
fb share twitter share gplus share more share

Anybody?

Thanks.
ThomasTe is offline  
Unread 29th Mar 2011, 08:00 PM   #3
HyperActive Warrior
 
Join Date: 2010
Posts: 160
Thanks: 11
Thanked 12 Times in 12 Posts
Default
Re: Add padding to suckerfish css menu
Share on: 
fb share twitter share gplus share more share

Easy

#nav ul { line-height: 1;
list-style: none outside none;
margin: 0;
padding: 0 10px;


}
Cash Money Hosting is offline  
Unread 30th Mar 2011, 05:27 AM   #4
HyperActive Warrior
 
Join Date: 2008
Posts: 457
Thanks: 112
Thanked 7 Times in 7 Posts
Default
Re: Add padding to suckerfish css menu
Share on: 
fb share twitter share gplus share more share

Hi Cash Money Hosting,

Thanks for replying. However that only add spacing to the sides of the text. I need to add a padding of for exampe 3px all around the text.
I can see that I should have been more clear about that.

Can you help with that?

Thanks.

Best regards,
Thomas
ThomasTe is offline  
Unread 30th Mar 2011, 01:15 PM   #5
mad
Active Warrior
 
Join Date: 2009
Posts: 33
Thanks: 0
Thanked 1 Time in 1 Post
Default
Re: Add padding to suckerfish css menu
Share on: 
fb share twitter share gplus share more share

padding: 'top' 'left' 'bottom' 'right';

line-height sets line height

also margin: 'top' 'left' 'bottom' 'right';

if this is a link make sure the 'a:hover' has the same margin, paddings, etc like 'a'

mad is offline  
The Following User Says Thank You to mad For This Useful Post:
Unread 30th Mar 2011, 02:36 PM   #6
VIP Warrior
War Room Member
 
SteveJohnson's Avatar
 
Join Date: 2007
Location: Caldwell, Idaho, USA.
Posts: 1,967
Thanks: 1,024
Thanked 2,043 Times in 1,183 Posts
Default
Re: Add padding to suckerfish css menu
Share on: 
fb share twitter share gplus share more share

For 1em padding around link:
Code:
#nav a { padding: 0.5em; width: 9em; }
#nav li ul ul { -2em 0 0 10em }
#nav a width needs to be 10em - 2*padding
#nav li ul ul top margin needs to be -1em - 2*padding

so if you want .25em padding:
Code:
#nav a { padding: 0.25em; width: 9.5em; }
#nav li ul ul  { -1.5em 0 0 10em; }

The 2nd Amendment, 1789 - The Original Homeland Security.

Gun control means never having to say, "I missed you."
SteveJohnson is offline  
The Following User Says Thank You to SteveJohnson For This Useful Post:
Unread 31st Mar 2011, 12:50 AM   #7
HyperActive Warrior
 
Join Date: 2008
Posts: 457
Thanks: 112
Thanked 7 Times in 7 Posts
Default
Re: Add padding to suckerfish css menu
Share on: 
fb share twitter share gplus share more share

Hi Mad and Steve,

Thanks alot, it works now. I used Steve's samples.
I'm pretty new with CSS (as you can probably tell), and have gone forward with trial and error, but now it works.

Thanks alot, guys.

Best regards,
Thomas
ThomasTe is offline  
Closed Thread


Bookmarks

Tags
add, css, menu, padding, suckerfish


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




All times are GMT -6. The time now is 12:15 PM.