Hi guys
I'm trying the get my site to resize the left margin using triggers of screen resolution and type of browser, I've got it down for IE ok but firefox and opera need a larger leftmargin to centre the page. The code I have so far is:
onload call:
Code:
<body onLoad="MM_preloadImages('img/nav3448978125a.gif');checkRes()">
Javascript
:
Code:
<script language = "javascript">
function checkRes()
{
if (screen.width == 1024 && screen.height == 768)
{
document.getElementById("container").style.marginLeft = "5%"
}
if (screen.width == 800 && screen.height == 600)
{
document.getElementById("container").style.marginLeft = "15%"
}
}
</script>
I've not managed to work out how to make browser specific changes to the margin, could anyone help?
Ben