MihirUj
MihirUj

Reputation: 43

disable body when iframe window is open

I want to make a box, for some subscription purpose. How it should be :

It looks pretty simple and actually it really is.
With the use of jquery and css i could create a iframe box. But, the real problem i faced was this :

So, i need to disable the body or something like unclickable, when the iframe is opened.

Upvotes: 0

Views: 720

Answers (1)

Diodeus - James MacFarlane
Diodeus - James MacFarlane

Reputation: 114417

Put a DIV over the whole page when the iframe is open.

<div class="cover"></div>


.cover {
     position:fixed;
     top:0;
     bottom:0;
     left:0;
     right:0;
     z-index:2;
     color:rgba(0,0,0,0.3)
}

...just give your iframe a higher z-index.

Upvotes: 1

Related Questions