Jump to content

masking the page


michaellunsford

Recommended Posts

pretty simple CSS thing I've seen done on a number of sites. You click an image, and a div "pops" up with a close "X" in the top right corner. Usually, the rest of the site behind the popup is masked with a 60% opacity.

 

So, I built one and it works great -- except my background mask isn't working quite right. It's set to height:100% -- if the page has a scroll bar and the user scrolls down, the 100% high mask ended at the bottom of the screen (not the page). So, they can scroll past the mask.

 

The masks I've seen out there just have jquery apply a specific pixel height to the mask. I'm curious if there's a CSS-only way to do this. So far, I've not been successful. Thoughts?

Link to comment
https://forums.phpfreaks.com/topic/241360-masking-the-page/
Share on other sites

Yep, I should have thought of fixed -- it actually fixes a few glitches I'm having. Fixed seems to be a challenge for iOS devices, though. I guess I'd have to rely on jquery in that case, though. Right?

If you want the overlay to appear on the click of something, then yeah... you'll have to use jQuery, or JavaScript if you're old fashioned like that.

Link to comment
https://forums.phpfreaks.com/topic/241360-masking-the-page/#findComment-1239811
Share on other sites

If you want the overlay to appear on the click of something, then yeah... you'll have to use jQuery, or JavaScript if you're old fashioned like that.

 

Not to fire the event -- but for layout. iOS devices don't support "position:fixed" -- the elements just appear at the bottom of the page (based on their appearing last in the html code).

Link to comment
https://forums.phpfreaks.com/topic/241360-masking-the-page/#findComment-1239820
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.