dtucker1914
dtucker1914

Reputation: 499

hide an iframe in ie8

How do hide an iframe in ie8?

This is not working.

<iframe height="0" width="0" marginheight="0" marginwidth="0" frameborder="0" style="visibility: hidden; display: none; border: 0px; " id="_iframe" />

Upvotes: 1

Views: 1321

Answers (2)

dtucker1914
dtucker1914

Reputation: 499

I needed to add the name attr to the iframe.

ie

<iframe height="0" name="iframe" width="0" ... />

Upvotes: 0

The Alpha
The Alpha

Reputation: 146191

An iframe has a closing tag, i.e.

<iframe height="0" width="0" marginheight="0" marginwidth="0" frameborder="0" style="visibility: hidden; display: none; border: 0px; " id="_iframe"></iframe>

You've used it like a single tag, i.e.

<iframe height="0" width="0" ... />

This is not valid for iframe and this could be a problem for IE because it's not smarter like other browsers.

Upvotes: 3

Related Questions