Pigeon
Newbie
Posts: 1
Registered: 1/14/2005
Member Is Offline
|
| posted on 1/14/2005 at 01:45 AM |
|
|
Found way to centre menu
In menu.tpl set the blockleft to look something like this, replace the 255 with half the width of your current menu ... or just play around with it
until it looks right :)
'block_left': (document.body.scrollWidth/2 - 255),
For this to work, make sure you put this line after the <body> tag instead of after the <head> tag.
<script language="JavaScript" src="menu/menu_tpl.js"></script>
Also I found that when i resized the browser the menu would displace. To fix most instances of this you need to refresh the page on resize. To do this
add some stuff to your body tag.
<body onResize="window.location=window.location;">
If you REALLY want to be picky and say that the menu displaces when you resize the browser too small, you can have a resize script that stops people
doing this. Though this might annoy ppl so it's up to you. (after body tag)
<script type="text/javascript">
if (document.body.scrollWidth < 800)
{
window.resizeTo(808,600)
}
</script>
Have fun! This tigra is awesome btw ;)
|
|
|
|