Menu Widths & Tables

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
andycap1
Beginner
Beginner
Posts: 1
Joined: Wed Oct 22, 2003 3:26 pm

Menu Widths & Tables

Post by andycap1 »

I'm sure this has probably been posted before. Not so much a problem rather a question than anything. I notice than when links and such are diplayed in the menu, the all around menu only grows to the length of the longest label. Id like to have the menu grow to 100% of the table (ie. fill the table height and width). Just curious of where i should be doing any editing/adding to fix this (if any).

What ive done is droped the menu into a table and locked it in place so its not shifting arond on the web page. Unfortunaly ive been noticing that the menu shifts depending on different resolutions. So i was hoping the menu would grow and shrink with the table. Not sure at all if thats possible.

http://www.warrenequipment.com/new/default.asp
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Have you tried adjusting itemwidth & itemheight until the total amount is the size of the table space?

You could also blend the background color change the alignment so small changes wouldn't be noticed.

Regards,
maz
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

It seems to me that in testing someone else's problem today (can't recall which one), I noticed that menuwidth="100%" is now an available menu property option. I tried it quickly on a basic horizontal main menu (although not in a table), and it seemed to work.

Kevin
ApexSBS
Beginner
Beginner
Posts: 8
Joined: Thu Oct 23, 2003 10:40 pm

Post by ApexSBS »

menuwidth property doesn't do anything at all for me.

I have one in a table<td>horizontal menu</td> and using menuwidth doesn't seem to do a darn thing. I've tried percentages and fixed pixel width to no avail. I can't really play with itemwidth because some of my menu items are images only and don't align center if I widen the menuitem property. I have align set to center, but it only seem to apply to text, not images.

Thoughts?
ApexSBS
Beginner
Beginner
Posts: 8
Joined: Thu Oct 23, 2003 10:40 pm

Post by ApexSBS »

I got things working as needed by applying set itemwidth values to achieve the size I wanted and using imagealign for the image only items, but still figure menuwidth should work?!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Well...

I have seen various posts suggesting that you add a sort of "dummy" menu item as the last item in your menu, like so:

Code: Select all

aI("text=;itemwidth=100%;...additional properties as required...;);
You might need to use text=&nbsp;; for some browsers. You would also, of course, want to set your onbgcolor to match the style's off bgcolor, so that the menu item appeared to do nothing when moused over. You might also consider setting the new pointer property so that the browser doesn't give you the finger... uh... show you the hand cursor when moused over. There may be other properties you wish to set for that, or the previous item, depending on your particular implementation. If it were me, for example, and I was using menu item separators, I'd probably want to get rid of the separator in the previous menu item, so that there was no visual division between it and the "dummy" item.

You might also be interested in this thread regarding fixed widths.

Hope that helps,

Kevin
Post Reply