Click to See Complete Forum and Search --> : Help please


fla5hba5h
08-31-2003, 12:10 PM
Could someone help me out?

I'm making a DHTML menu script for my new layout (http://ourworld.cs.com/crack3r5/Untitled-1+copy.jpg), and I positioned the menus with CSS (left:350px;top:180px;position:absolute).

My script works fine, but then I realized how many pixels you can see varies from resolution to resolution, and I already made a script to change the table size depending on the resolution. I guess I could keep the resolution check and change the top and left attributes depending on the res....but couldn't I position the menus relative to the image links (document.images["link1"].left or something)? But then again my layout is layed out with CSS positioning, just with tables.

I'm just looking for maybe a simple event attribute....I'm not sure. but I've seen sites do it before, like this one: http://www.dhtmlcentral.com
I know the menu is slightly different (it appears when you mouseover, there's text links, the link color changes, etc.), but it should be the same concept.

David Harrison
08-31-2003, 02:27 PM
You can use %age's to position things on your page if you want. eg.

position:absolute;top:100px;left:33%;

fla5hba5h
09-01-2003, 02:23 AM
Nevermind, I found out with a little work. I ended up using event.clientY-event.offsetY.

David Harrison
09-01-2003, 11:54 AM
It may be better to position things with CSS rather than js, but if it does what you want I'm not try and stop you.