Posted by Toby Inkster on 08/26/05 09:51
David Dorward wrote:
> ppcguy wrote:
>
>> i can set the width of a DIV in IE using
>> #footer2{width: expression(document.body.clientWidth);}
>> how can i do a similar thing in non-IE
>
> width: 100%;
Not neccesarily the same thing!
Consider:
<div style="width:200px">
<div id="footer2">How wide am I?</div>
</div>
PPCGuy, in answer to your question: use Javascript.
<div id="footer2">How wide am I?</div>
<script type="text/javascript">
document.getElementById('footer2').style.width=document.body.clientWidth;
</script>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|