How can I make the subnav button wider to hold longer page titles on one line?
Thanks for the help.
Widen SubNav menu
Started by
danboyle
, Feb 02 2011 10:41 PM
7 replies to this topic
#1
Posted 02 February 2011 - 10:41 PM
#2
Posted 03 February 2011 - 02:50 AM
Your link is just a placeholder site, no WordPress install.
To help you out I'll at least need to know what theme you're using.
Thanks, Bryan
#3
Posted 04 February 2011 - 04:33 PM
Had the same question with PlatformPro. I tried to widen it just for a single sub-nav with this code:
... it works.
... it works.
#4
Posted 04 February 2011 - 04:38 PM
Is there any possibility to make those sub-navs automatically as wide as the content?
#5
Posted 04 February 2011 - 07:08 PM
Uli you would want to use a percentage value as the width instead of the em value.
Usually setting the ul to 100% and the li's to a evenly dividable number of 100 you get them all the way across.
#6
Posted 04 February 2011 - 07:22 PM
Brian, sorry the site was missing. It's back up now. Uli's code didn't have any effect for me regardless of the value substituted for 20em.
Thanks
Thanks
#7
Posted 04 February 2011 - 08:08 PM
Strange thing... I found this code with Firebug...
#primary-nav ul.sf-menu ul li {
width: 100%;
}
Changing the 100% value to 25em or 30em worked with Firebug but when I pasted the code into base.css nothing happened. Any clue?
Thanks,
Dan
#8
Posted 04 February 2011 - 08:39 PM
Oh! you are talking about the dropdowns. Well I would just make them wide enough to accomodate the longest value.
And if you want the text to not wrap then use:
`
#primary-nav ul.sf-menu ul li a {
white-space: nowrap;
}
`










