You are here: Re: css - setting width based on browser width « HTML « IT news, forums, messages
Re: css - setting width based on browser width

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация