Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Found way to centre menu
Pigeon
Newbie

Posts: 1
Registered: 1/14/2005
Member Is Offline
posted on 1/14/2005 at 01:45 AM Reply With Quote
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 ;)
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Tigra Menu
Product Demonstrations Live Demos:
Traditional Blue
White Steps
Inner HTML
All Together
Frames Targeting
Free Download Free Download
Free Download Menu Builders
Online Builder
Builder for Windows
Product Documentation Documentation:
Documenation Page
Change Log
Menus Comparison Table
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004