...

View Full Version : Styling A 100% width Iframe - IE problem



Moff
03-11-2005, 12:35 PM
Hi folk,

Excuse me for jumping straight in with a question, just found these forums and hoping one of you guys can help out here.

I'm trying to style an Iframe to 100% width of the screen so that it appears
Seemlesly on the page. Trouble is IE is not making this easy as it always seems to put in a right margin. However, It seems to work fine in Firefox.

Here's the code - does anyone know a way to get rid of the this margin?

HTML


<iframe name="iframe1" src="http://www.third-party-site.co.uk">


CSS


iframe{
position: absolute;
top: 0em;
left: 0em;
z-index: 2;
frameborder: 0;
width: 100%;
height: 300;
scrolling: no;
border-right: 0px;
border-top: 0px;
border-left: 0px;
border-bottom: 0px;
margin-right: 0px;

}

_Aerospace_Eng_
03-11-2005, 12:43 PM
its the default margin of the body element

html,body {
margin:0px;
padding:0px;
}

Moff
03-11-2005, 01:27 PM
Excellent,

thanks for that - had totally forgotten about the body margin.

Moff



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum