menu wraps when browser resized
My menu works fine, but when the browser is resized (smaller), the menu wraps to a second or third line. Is there a setting I can use to make the menu ignore browser resizing?
My menu works fine, but when the browser is resized (smaller), the menu wraps to a second or third line. Is there a setting I can use to make the menu ignore browser resizing?
Two ways - you can give your menu a fixed width, or the div that is containing it a fixed width.
To set a width for the menu itself, in your menu.css:
ul#cssmw2 {
cursor: default;
list-style-type: none;
margin: 0 0 0 0;
padding: 0 0 0 0;
}
You can add a width to this, so:
ul#cssmw2 {
cursor: default;
list-style-type: none;
margin: 0 0 0 0;
padding: 0 0 0 0;
width:960px;
}
and adjust the width and see the results in the page. Start with a width deliberately smaller (so the menu 'collapses'), and increase it until your menu fits in. This is easiest in Dreamweaver in 'split' view, with your menu showing in design view, and the menu.css stylesheet showing in the top.
The other way is to add a fixed width to the div containing your menu or include.
For the menu to handle being re sized, you will need to create the menu using ems instead of pixels. you will need to change the font heights, box widths and heights, padding, margins etc. anything that is sized using pixels, will need to be converted to ems.
Hi Jason,
I'm not sure that would be necessary, in that I'm not sure Mike is asking for his menu to be re-sizable, but merely not to collapse when the browser is re-sized.
I may have got the wrong end of the stick again, but that's my interpretation.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.