Setting a div size for Microsoft.Matrix operation, O.T.?

F

foldface

Hi
I am trying to scale an image to be the size of the browser.
The actual scaling is easy, what I cann't do is set the size of the
div to the correct value, i.e. either most of the div is chopped off
or the scrollbars are activated as the div is too big.
The html code using the google image is shown below, any ideas?
I'm also not sure what the best newsgroup is for this?

Ta
F


<body>
<form name="frm">

<div id="TheBackgroundId" name="TheBackgroundName" style="
filter: progid:DXImageTransform.Microsoft.Matrix(M11=1,M22=1,M21=0,M12=0);
background-image: url(http://www.google.co.uk/intl/en_uk/images/logo.gif);
position: absolute; top: 0px; left: 0px; width: 276; height: 110;
z-index: -9999;
border:groove
"></div>
<script>

<!-- fnResize function -->
//oObj input requires an matrix filter applied.
//flMultiplier input defines the amount by which the oObj is resized.
function fnResize(oObj,widthMult, heightMult)
{
oObj.filters.item(0).M11 = widthMult;
oObj.filters.item(0).M22 = heightMult;
}


fnResize(TheBackgroundId, document.body.clientWidth/276,
document.body.clientHeight/110.0)

// heres the problem

TheBackgroundId.style.poswidth = document.body.clientWidth;
TheBackgroundId.style.posheight = document.body.clientHeight;

</script>

</form>
</body>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top