My function looks like this:
Code: Select all
var ie4_check = (document.all && !document.getElementById) ? true : false;
var ie5_check = (document.all && document.getElementById) ? true : false;
function findMenuLeftStart(){
if (ie4_check || ie5_check) {
width = document.body.clientWidth;
}
else {
width = window.innerWidth;
}
width = width/2-380
return(parseInt(width));
}
Code: Select all
left=findMenuLeftStart();
How can I use my function to change the left position of the main menu ?
I know that I could position the menu relative in order to follow my centered design, but this isn´t an option in this case. I really need to be able to set the left pos dynamically.
Hope someone can help me
