PDA

View Full Version : dynamically positioning the DIV


TonyL
11-06-2004, 11:08 AM
I have a flash menu which rolls over a HTML page.

I have set the divs up for the flash, except, the content displays in the center of the screen, so, the div has to be constantly re-positioned because the main content table streches vertically and the width will obvious change with screen resolution.

heres the script

<SCRIPT>

var TabHeight=document.getElementById("menuholder").offsetTop;
var TabWidth=document.getElementById("menuholder").offsetLeft;


// Feed the final values in to the top and left attributes of the div tag
document.getElementById("menulayer").style.top = TabHeight;
document.getElementById("menulayer").style.left = TabWidth;

</script>


menuholder = table id where the div needs to be positioned
menulayer = the div id that the movie resides in.

I have tried ilayers etc but they all blow out to the height of the movie so they don't rollover the page

can anyone help???

thanks in advance