View Full Version : Resolved jqueryslidemenu width problems

12-29-2008, 10:16 PM

I'm having a width problem with jqueryslidemenu. I have a fixed width menu, but my right-most submenus are quite wide and go beyond the width of my content area.

I tried doing a negative margin but then it just floats around with the size of the window as I resize it.

The demo page is at http://www.numarasoftware.com/default2.asp

Any thoughts on correctly positioning so everything lines up?


12-30-2008, 12:06 AM
Do you mean the sub menus associated with the "Contact" menu item? It's a thin drop down menu for me and doesn't go over the right edge of the browser window. Or maybe I'm misunderstanding something?

12-30-2008, 12:23 AM
I'm not sure I understand what you mean either, but in case I do, this might help, try decreasing this width:

<li style="width: 250px;">

12-30-2008, 03:35 AM
The About and the Services menu go well past the right edge. I dont want to cause any of the menu items to wrap. I know I have some room to play with, but not enough.


12-30-2008, 04:13 AM
Here's a screenshot of the About Submenu for me:


In other words, it does drop down to the left of the browser's right edge when there isn't enough space to the right. Still not sure what you mean by not wrapping.

12-30-2008, 09:55 AM
I think he/she means that it should drop down to the left even if there is enough space, that it should treat the end of the page as the browser edge.

12-30-2008, 02:54 PM
Here is my screenshot. The drop down moves left to right based on my browser screen size. It is preferable that it align where I want it rather than floating around.

In this screenshot, it goes past the right edge of the content area, whereas in your screenshot, your browser window is probably shrunk down a fair amount and thus is in the middle.


12-30-2008, 08:54 PM
Any thoughts on this? I could potentially figure this out recoding the whole thing, but want to avoid that. Ideas?

12-30-2008, 09:17 PM
Find this in your jqueryslidemenu.js file on row 34:

menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
and change the highlighted to this:

menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$('#myslidemenu').width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
That will make the submenus open towards the left (like they would if the browser window was too small) if they are wider than the menu when opening to the right.

12-30-2008, 09:58 PM
Great! That worked.

Now for the next trick :). I'm planning on using background images and I saw your code in another post for that and dont have a problem with that. But how can I keep the mouseover image changed for the top menu when the mouse is over UL for the submenu?


12-30-2008, 10:05 PM
Find this code in your jqueryslidemenu.css file on row 35:

.jqueryslidemenu ul li a:hover{
background: black; /*tab link background during hover state*/
color: white;
and change it to this:

.jqueryslidemenu > ul > li:hover > a{
background: black; /*tab link background during hover state*/
color: white;

01-09-2009, 01:27 PM
Aweswome. Thanks!

01-09-2009, 01:41 PM
You're welcome, glad to help! You can go to your first post in this thread, click http://www.dynamicdrive.com/forums/images/buttons/edit.gif then click Go Advanced and add the Resolved prefix to the thread title. This will let other users know the problem has been solved.

Good luck with your site!

01-09-2009, 03:12 PM
Interesting. I can see the Edit button for my last two posts, but not the first few.

01-09-2009, 04:04 PM
Yeah, it has happened to me as well:
http://www.dynamicdrive.com/forums/showthread.php?t=39636 (http://www.dynamicdrive.com/forums/showthread.php?t=39636)

It must be a bug or something, you can ask a mod or admin to fix it for you, and maybe to look into why this happens as well.

01-10-2009, 06:05 AM
Interesting. I can see the Edit button for my last two posts, but not the first few.

It's not a bug, just that there is a time limit of 10 days before a poster can no longer edit his/her post. Ideally editing of the thread prefix should be separate from editing of a post/thread, but that's how VB works at the moment unfortunately.

Anyhow, I've edited the prefix for you. :)

01-20-2009, 03:31 AM
Interesting. I love the Jqueryslide menu, it is terrific in most browsers. Unfortunately, as most of you know, IE6 is causing headaches. Anyway, so I'm having trouble making my Jqueryslidemenu work in IE6, as well as some css issues with my basic template I used from DD here http://www.dynamicdrive.com/style/layouts/item/css-fixed-layout-31-fixed-fixed-fixed/ (http://www.dynamicdrive.com/style/layouts/item/css-fixed-layout-31-fixed-fixed-fixed/) but modified of course. Anyone willing to help me with these issues? Thanks.

01-20-2009, 03:45 AM
Try making a new thread in the DD Scripts Help (http://www.dynamicdrive.com/forums/forumdisplay.php?f=2) category including the following data:

A link to your page
Your code