drop down menu has extra white space

Dan Carmeli
Joined: 03 Feb 2009

drop down menu has extra white space

Posted:13 Feb 2009 (15:07 UTC)
Hi,

My drop-down menus have extra white space on the right. Any idea where that is coming from? I looked through the css several times and couldn't figure it out...

please see http: / / wiki.ramahoutdoors.org

thanks,
Dan
laetzer
Joined: 15 Mar 2004

Re: drop down menu has extra white space

Posted:13 Feb 2009 (20:56 UTC)
It's the 20px font size that is set in line 232. Nested list items further down are not taken into account. To fix this, try:

your style's CSS file


/* old line: */
232 ul.hor li{background-color:#e9ecef;padding:1px 1px 1px 13px;font-size:20px}

/* new lines: */
232 ul.hor li{background-color:#e9ecef;padding:1px 1px 1px 13px}
233 ul.hor li a.head {font-size:20px}


Also, please consider the Firefox extensions Firebug, as well as Web Developer. It takes only a few seconds to find out what's causing this extra white space.

Also, while in development, deactivate template caching in bitweaver/kernel/config_inc.php and the caching of Javascript and CSS files in Admin > Themes > Settings.

And you can post links by wrapping them in square brackets.
kinderlehrer
Joined: 20 Jun 2008

Re: drop down menu has extra white space

Posted:13 Feb 2009 (22:15 UTC)
Laetzer, how can a parameter that defines the height {ie font size} of an item affect white space on the right hand side of the drop-down menu item?


laetzer
Joined: 15 Mar 2004

Re: drop down menu has extra white space

Posted:14 Feb 2009 (12:01 UTC)
Because of a collision of units. Drop down menus of nested lists are created with 'graceful degradation' concepts in mind. There are em units more often than px units. Since font sizes are passed on to nested elements, but refer to their parent elements, the 20px must mess up some fixed (or relative?) points that the nested lists do have when either everything is em or everything is px.

It would take longer to find out if it's the cause for this exact case, but in my opinion, the pixel height alters what the browser thinks "one em" is. Back to those concepts … font sizes and margins being declared in em …

Also, taking the font size back like in the example got rid of the extra white space.
Dan Carmeli
Joined: 03 Feb 2009

Re: drop down menu has extra white space

Posted:16 Feb 2009 (17:05 UTC)
Not a perfect fix, but ok for now. The only issue is that now if I have a submenu attached to one of the drop-down items, that drop down item now has a font of 20px. Its ok for now because that only currently is the case with the admin menu (which only I have to see...) Any thoughts?

thanks,
Dan
laetzer
Joined: 15 Mar 2004

Re: drop down menu has extra white space

Posted:17 Feb 2009 (20:39 UTC)
Not a fix at all. Mixing Px in there with Em smells like trouble. Just a suggestion on where to look. Was the 20px value a Bitweaver-value in the first place? Bitweaver's drop down menu uses the suckerfish menu technique, you can search for this on the web and download many styles and themes for it. You'd have to replace the lines in your current style's CSS with those new ones. The chance might then be higher that this is tested better and cross browser.

Quite obviously, you can also throw more CSS at your problem, but it's again no actual fix, mainly because it's not tested:

your style's CSS file


/* old lines: */
232 ul.hor li{background-color:#e9ecef;padding:1px 1px 1px 13px}
233 ul.hor li a.head {font-size:20px}

/* new lines */
232 ul.hor li{background-color:#e9ecef;padding:1px 1px 1px 13px}
233 ul.hor li a.head {font-size:20px}
234 ul.hor li li a.head {font-size:…}

Dan Carmeli
Joined: 03 Feb 2009

Re: drop down menu has extra white space

Posted:27 Feb 2009 (14:48 UTC)
How do you deactivate caching of Javascript and CSS files in Admin > Themes > Settings? I can't tell which option is relevant...

thanks
xing
Joined: 07 Mar 2004

Re: drop down menu has extra white space

Posted:28 Feb 2009 (07:44 UTC)
turn off css and js packing and joining

x
  Page 1 of 1  1