You are here: Re: newbie: css position of IFRAME « HTML « IT news, forums, messages
Re: newbie: css position of IFRAME

Posted by Steve Pugh on 11/22/05 17:03

Jeff wrote:

> I'm testing this on IE, 6.0 (but I want my code to work on all modern
> browsers: Opera, FireFox, IE, Netscape Navigator)
>
> I want the iframe (see code below) to fill the entire space the DIV it is
> placed within
> <div id="content">
> <iframe id="frameid">
> </iframe>
> </div>
>
> This is the CSS data I use to configure the layout of the html code:
> #frameid {
> left:0px;
> right:0px;

With no position property set these are meaningless.

> width:100%;
> border:2px solid #00C;
> background-color:#C0C0C0;
> }
>
> #content {
> margin:0 190px 0;
> left:190px;

Again, with no position property set this is meaningless.

> border:2px solid #00C;
> background-color:#C0C0C0;
> }
>
> The problem is that the width of the IFRAME is larger than the DIV it's
> placed within, I thought if I specified the IFRAME width to be 100% it's
> then set to 100% of its parent container (here the DIV)??

It is. But...
100% + 2px border on lefy + 2px border on right > 100%
So the iframe itself is 100% of the width of the div, and then the
iframe has a 2px border all round.

Steve

 

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

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