sayedsohail Posted September 13, 2007 Share Posted September 13, 2007 Hi everyone, I am not sure to open this thread here, please no grims. I got a php page and a hidden div. onlick of a button the hidden div is visible with zindex 100, but i would like to dim the parent window when the div is visible. Can someone help in this regard. Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/69182-solved-dimming-the-background-when-div-is-visible/ Share on other sites More sharing options...
micah1701 Posted September 13, 2007 Share Posted September 13, 2007 you'll want to make a small, translucent image of some light-gray color. then, make it the background of a hidden div with a width and height of 100% and a z-index somewhere between your main content and your pop-up. when you un-hide the pop-up, unhide this div as well. there may be other methods, but this is what i've done in the past. Either way, you can't do this in PHP -- so mod's feel free to move this to another board. Quote Link to comment https://forums.phpfreaks.com/topic/69182-solved-dimming-the-background-when-div-is-visible/#findComment-347730 Share on other sites More sharing options...
Jessica Posted September 13, 2007 Share Posted September 13, 2007 Of course, IE6 does not support PNG, the only image file format which can make that sort of transparency. However, IE6 does support CSS transparency, IIRC. Google "lightbox" and you will see tons of pre made scripts to do what you want. Quote Link to comment https://forums.phpfreaks.com/topic/69182-solved-dimming-the-background-when-div-is-visible/#findComment-347735 Share on other sites More sharing options...
micah1701 Posted September 13, 2007 Share Posted September 13, 2007 good point about the PNG i remember now that most recently, i've used a 2 pixel gif where one pixel is a solid, light color (like #F3F3F3) and the other is completely transparent. this grays out the background nicely and makes it more like a screen door Quote Link to comment https://forums.phpfreaks.com/topic/69182-solved-dimming-the-background-when-div-is-visible/#findComment-347740 Share on other sites More sharing options...
sayedsohail Posted September 13, 2007 Author Share Posted September 13, 2007 sorry guys can you please show some code. thanks Quote Link to comment https://forums.phpfreaks.com/topic/69182-solved-dimming-the-background-when-div-is-visible/#findComment-347814 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.