Could you please help me with an alignment issue with my dropdown menu in javascript?
Return to Recent Questions
Q:
Hello, could you please help me with an alignment issue with my dropdown menu in javascript.
I set the x alignment to=266 but the y alignment is left blank because I would like to keep the dropdown menu in javascript
centered on the site.
A:
To center the dropdown menu in javascript paste it
within the <div> or <table> with a relative position and specify a center alignment for it, for example:
<DIV align=center>
<SCRIPT src="data/data.js" type=text/javascript>
</SCRIPT>
</DIV>
Please, set exact value in "px" for var menuWidth parameter, for example:
var menuWidth = "300px";
This can help to align your menu correctly in all browsers.
Set also:
var absolutePos = 0;
Try that.
Return to Recent Questions
|