Making an iframe viewable but not "clickable" in IE. Possible?

2 replies
  • WEB DESIGN
  • |
Hey guys,

It's been a while since I've been stumped over a HTML/CSS issue, but this one's got me!

Basically, I've got a project that requires an iframe that's viewable, but not "clickable" (in other words, if the user tries to click inside the iframe, nothing should happen).

So what I've done is layer a transparent div on top of the iframe using absolute positioning and z-index. This works perfectly in every browser... EXCEPT for IE!

So... any ideas for getting IE to cooperate?

Here's the HTML...

HTML Code:
<!-- Container -->
<div style="width: 600px; height: 400px;">

    <!-- iFrame -->
    <iframe src="http://www.website.com" style="width: 600px; height: 400px;"></iframe>
        
    <!-- Transparent div> -->
    <div style="background-color: transparent; top: 0px; left: 0px; position: absolute; width:  600px; height: 400px; z-index:9999">
    </div>

</div>
#clickable #iframe #making #viewable
  • Profile picture of the author webpeon
    I dont if this would work but you could try naming the iframe and then setting it as the target and just letting it loop if the click the iframe - I'm a bit rusty on iframes as well, had to do some research on them yesterday for something else I was doing

    eg

    <iframe name="myiframe" target="myiframe">
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[6598984].message }}
    • Profile picture of the author Brandon Tanner
      Originally Posted by webpeon View Post

      I dont if this would work but you could try naming the iframe and then setting it as the target and just letting it loop if the click the iframe - I'm a bit rusty on iframes as well, had to do some research on them yesterday for something else I was doing

      eg

      <iframe name="myiframe" target="myiframe">
      Hey there,

      Thanks for the suggestion, but that doesn't appear to have any effect.

      Anyone else have any ideas?
      Signature

      {{ DiscussionBoard.errors[6599479].message }}

Trending Topics