Jump to content

[SOLVED] negative margins for iframe showing different in FF and IE


scarhand

Recommended Posts

i am trying to display a form from a website inside an iframe

 

the problem is, this form displays perfectly in IE:

 

formiegg5.jpg

w396.png

 

but it displays wrong in FF:

 

formffds6.jpg

w402.png

 

heres the CSS:

 

#container{
  width: 380px;
  height: 288px;
  overflow: hidden;
  border: 3px solid #4398d4;
}
#container iframe {
  width: 800px;
  height: 600px;
  margin: -305px 0px 0px -40px;
}

 

heres the HTML:

 

<div id="container">
<iframe src="http://wow.eroticagateway.com/signup/signup.php?step=signup&qualify=1&site=226&nats=NzUxNjg6MzoyMjY" scrolling="no" frameborder="0"></iframe>
</div>

 

any idea why this is happening?

Link to comment
Share on other sites

IE isn't so good with negative margins. Which is where your problem is coming from.

 

You basically have two ways you can deal with this - rework your code so that you aren't using negative margins (better way, but potentially time-intensive) or you can use conditional comments to write IE specific CSS (not as good a way, but faster and easier).

Link to comment
Share on other sites

Got me - its not a question that can be answered simply. Everything affects everything else, so making once change requires another. But if you have a negative margin, that means either that something is pushing that element down, or that its in the wrong place in the document. Play around with those kind of things.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.