Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help With Menu Position

Status
Not open for further replies.

chant9

Technical User
Aug 30, 2005
7
Hi

I've found found some good example JavaScript Menu's that I can use but was wondering if its possible to not hard code the position of a menu with static X and Y coordinates.

For example I didnt want to have the website all aligned to the left but have a site centered with blank edges on either side (Yahoo Style). However depending on how large the window was would alter the size of the gaps at the edges, but I cant find a way to have the position of the menu adjust with this.

Currently the position of the menu must always be a set number of pixels down and along from the top left of the browser. Is it possible to place it inside a table or something and have it move to where ever the tabel is position

Hope that makes sense, please help if it does.
 
It sounds like your menu is specifically designating it's position on the screen. Normally you could just have the menu within <center></center> or using the align attributes on whatever encompasses it.

What you will have to do is detect the window size when the page loads then call a function to adjust the positioning of your menu. You can do this relatively easily but the methods to do it vary by browser. Would need to see your code to be more specific.

Paranoid? ME?? WHO WANTS TO KNOW????
 
Try taking out the positioning statements.
Put the menu code into a DIV or SPAN or even in a Table that has been centered.

I glanced at the link but I do not have the time to sort through their code to see what it is doing. It is going to be different in the way it is implemented in your code anyway so it is your code that I would need to see, at least the parts related to displaying the menu.


Paranoid? ME?? WHO WANTS TO KNOW????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top