(c) 2007, DHTML-Menu.com
 
   
   
  Support
  Recent Questions
  Write To Support
 

    I want my javascript pop up menu appears at the top the page with center align. Is it possible?

Return to Recent Questions


Q: My menu is mostly working great. I want my javascript pop up menu to appear centered at the top the page. Here's the code:

<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><script type="text/javascript" src="navbar.js"></script>
</td>
</tr>
</tbody>
</table>

The table appears at the far left edge of the window. I tried with both absolute (x=20, y=10) and relative (both x and y unset) coordinates. Help!


A: If you want to center the javascript pop up menu 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>

<table width=800>
<tr>
<td align=center width=600>Write Us
All rights reserved. free bootstrap templates | website designer | free website generator | top web builder | bootstrap navbar