Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] DropDown menu issues - width and height. (http://forum.bytesforall.com/showthread.php?t=20433)

suwak Jun 1, 2013 05:13 PM

[SOLVED] DropDown menu issues - width and height.
 
Hello.

I've stumbled upon following issues with DropDown menu:
- when my subpage name gets too long, the menu wraps the text,
- with text wrapped it has a problem with displaying more rows (more than seven); I've got three menus each of them with several subpages; in one of them the wrapped text gets to nine rows and the last ones are not visible, the menu just cuts them;
- the only parameter I've found to get around wrapping is the width parameter in menus.css:
HTML Code:

.menu ul a,
#menu1-smooth a,
#menu2-smooth a {
width: 150px;
white-space: normal; /* 2nd level items we DO want to wrap */

- when I change it to say 200px, the text gets unwrapped, but it then gets cut from the right - the text itself gets wider space, but the menu doesn't, it's always the same width;

So the question would be how to change dropdown menu width and height to avoid such issues.

Thanks,
Tomek

lmilesw Jun 2, 2013 06:07 AM

This is where using a tool like Firebug is necessary to find the proper selectors.
One POSSIBLE selector is
HTML Code:

#menu1-smooth div
But I didn't go into extensive testing.

suwak Jun 2, 2013 11:28 AM

Thanks for the reply Larry.

I am using Firebug to figure out the code, and I see the width parameter there, but I can't find it in the Montezuma options.

I played a bit with #menu1-smooth, but all the changes apply to the main menu not to the dropdown menu.

lmilesw Jun 2, 2013 01:41 PM

You have to use the code as mentioned above with div at the end. I don't think there is a theme setting for the width of sub menus.

There is a setting of 150px for the words within the sub menu in one of the virtual CSS files.

suwak Jun 2, 2013 04:11 PM

Thanks, Larry.

Unfortunately I still can't get it to work :(

I guess I just don't know how. I've tried many things and got to change many aspects both of menu itself and the drop down menu, but I couldn't change the drop down menu width or height.

lmilesw Jun 2, 2013 04:59 PM

You could try the following in any of the virtual CSS files and adjust the widths as desired. I would probably put at the bottom of the menus.css virtual file in the theme options.
HTML Code:

#menu1-smooth a {
    width: 280px !important;
}
#menu1-smooth div {
    width: 300px !important;
}

The top one is for the text inside the dropdown and could be adjusted with some CSS that is already in the theme options but this will overwrite it and put all the CSS in one place so you can adjust both as needed without jumping between two areas. Or you could put the second under the CSS that is already in place in the menus.css.

suwak Jun 3, 2013 04:58 AM

Thank you very much, Larry!

This works like a charm :)


All times are GMT -6. The time now is 05:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.