Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

centering DynamicHeaderMenu


rag

Recommended Posts

First of all does anyone now of a forum url for the contribution DynamicHeaderMenu? Can't seem to find it.

 

My question is: has anyone centered the DynamicHeaderMenu (DHTML menu contribution)? The margins are absolute and I want my site centered in the window regardless of the users screen resolution.

 

Using the code below (i think) could someone help me in centering this <div>.

This code is from DHTML menu/menu.js:

function mitem_init() {
document.write (
 '<a id="mi_' + this.container.id + '_'
	 + this.id +'" class="m' + this.container.id + 'l' + this.depth 
	 +'o" href="' + this.fields[1] + '" style="position: absolute; top: '
	 + this.get_y() + 'px; left: '	+ this.get_x() + 'px; width: '
	 + this.container.pos['width'][this.depth] + 'px; height: '
	 + this.container.pos['height'][this.depth] + 'px; visibility: hidden;'
	 +' background: black; color: white; z-index: ' + this.depth + ';" '
	 + 'onclick="return menus[' + this.container.id + '].onclick('
	 + this.id + ');" onmouseout="menus[' + this.container.id + '].onmouseout('
	 + this.id + ');" onmouseover="menus[' + this.container.id + '].onmouseover('
	 + this.id + ');" onmousedown="menus[' + this.container.id + '].onmousedown('
	 + this.id + ');"><div class="m'  + this.container.id + 'l' + this.depth + 'i">'
	 + this.fields[0] + "</div></a>\n"
 );
this.element = document.getElementById('mi_' + this.container.id + '_' + this.id);
}

 

Thanks a whole bunch!

Rob

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...