homepage Welcome to WebmasterWorld Guest from 54.211.7.174
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Positioning JavaScript menus
Want them to line up properly at different resolutions
tortured virtue




msg:1491322
 4:42 pm on Jun 11, 2003 (gmt 0)

I am trying to create menus for my webpage, but I am having trouble getting the menus to display where I want them to. I got them nice and straight using pixel coordinates, but if someone viewing the page is set at a different resolution, the tables will line up off to one side. Is there a way to set a definite reference point for the menu to load, instead of having to use coordinates? Right now, the menus are opened when you move your mouse over certain images. Is there a way can just have them come up directly below the image? Thanks.

 

BlobFisk




msg:1491323
 4:50 pm on Jun 11, 2003 (gmt 0)

You could use relative positioning, but this can cause a bouncing of any content below the image.

Coordinates specified are relative to their parent element. That is, the co-ordinates for a div on a page are relative to the top left corner of the document. The 0,0 coordinaties for a div nested within a div are the top left corner of the parent layer.

The problem with pixel perfect designs is the heterogeneity of the resolutions used by your users. Designing something to appear 900px to the right of the left of the page will mean that a user, whose reolution is 800x600, will have to scroll horizontally to see it. This is very important to keep in mind when using pixel perfect designs.

tortured virtue




msg:1491324
 5:38 pm on Jun 11, 2003 (gmt 0)

I`m not sure I follow you. I`m not really trying to align the image; it`s the menu I want to align. When I use a div, it doesn`t reallt affect the menu, just the image. Here is the line of code for the image and menu:
<div align="left"> <img src="pre/company.jpg" alt="" width="133" height="20" onmouseover="showMenu(company, 200, 100);hideMenu(design);"></div>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved