PDA

View Full Version : JsDOMenuBar Problems Centering



mrfresshh
09-30-2006, 03:55 PM
JsDOMenuBar version 1.11

http://www.dynamicdrive.com/dynamicindex1/jsdomenubar/index.htm

I am having problems centering the menu. I usually put
}
menuBar.moveTo(95, 10);
}

but i need it to center at the top of the page so a 1024x768 monitor can see it centered just like a 1280x1024 lcd can see it. can u help? :D

jscheuer1
09-30-2006, 04:48 PM
From the installation package, use demo4_strict.htm as your template and change this:


<div id="staticMenuBar"></div>

in the body of that page to:


<div style="width:400px;margin:0 auto;" id="staticMenuBar"></div>

You can use whatever value for the width that you prefer but, it must have one. With a declared width style property, in strict mode, most modern browsers (including IE) will center with margin:0 auto; set.