Hi,
I try to make a horizontal menu with 5 mainitems each 20% width so they wil scale. Now the mainitems are images 150px width, and I would like (comparing with table) the 'cells' to be 20% each.
[/url]http://www.oplijn.nl/sp_mimenu[url]
I studied several samples but did not ... lue.
Grea[/url]
wanted: 5 mainitems each 20% width
-
- Beginner
- Posts: 6
- Joined: Thu Nov 27, 2003 3:53 pm
-
- Beginner
- Posts: 6
- Joined: Thu Nov 27, 2003 3:53 pm
Hi Grea,
As far as I know, the itemwidth property doesn't support widths specified as percentages (I just tried it, and it didn't work). The description of itemwidth says:
One option you could try is, in the main menu definition, remove any itemwidth setting, and define:
Your main menu bar would span the entire width of the browser window, with the "active" part of the menu centered, and with extra space added equally to the left and right sides. As you make the window narrower, the extra space on either side would shrink, and the menu items themselves would remain centered on the page. Similarly when making the window wider... extra space added equally to either side, with the menu items centered in the page.
Kevin
As far as I know, the itemwidth property doesn't support widths specified as percentages (I just tried it, and it didn't work). The description of itemwidth says:
It seems to be specific to number of pixels. Percentages would be a nice touch though.itemwidth is an optional property that will fix the width of a menu based on declared pixel values. If this value is ommited, the menu will calculate the best width to use.
One option you could try is, in the main menu definition, remove any itemwidth setting, and define:
Code: Select all
menuwidth="100%";
menualign="center";
Kevin
-
- Beginner
- Posts: 6
- Joined: Thu Nov 27, 2003 3:53 pm
Thanks for your answer Kevin.
I did try those possibilities before posting the question and was hoping I missed a clue in the 100% span sample.
Precentage-itemwidth would be great indeed, for now I have to think of something else.
May be do some expiriments with 5 (main) menu's in a row... Anyone done this before?
Grea
I did try those possibilities before posting the question and was hoping I missed a clue in the 100% span sample.
Precentage-itemwidth would be great indeed, for now I have to think of something else.
May be do some expiriments with 5 (main) menu's in a row... Anyone done this before?
Grea
-
- Beginner
- Posts: 6
- Joined: Thu Nov 27, 2003 3:53 pm