Forums
View unanswered posts | View active topics It is currently Fri Jul 25, 2014 7:04 pm



Reply to topic  [ 3 posts ] 
 box-shadow increases document dimensions 
Author Message

Joined: Mon Oct 10, 2011 8:21 am
Posts: 5
Post box-shadow increases document dimensions
Sorry, I posted this once already and then confused myself into thinking I was wrong. Unfortunately, I wasn't.

Consider a footer div, positioned at the bottom of a document. There are no scrollbars present on the window because the document doesn't exceed the available window space. Now, if you give the div PIE and add a box-shadow, scrollbars appear on the window in IE 9 and lower, but not in other browsers that support box-shadow natively. PIE needs to perform a few calculations to see if the shadow would exceed the document bounds and, if necessary, clip the shadow accordingly.

To work around the problem, I had to add extra <div> elements to the markup and style them with overflow:hidden; to clip the shadow manually. It would be nice, though, if I could keep the markup clean and have PIE take care of this for me.


Tue Oct 11, 2011 6:07 am
Profile

Joined: Thu Apr 07, 2011 3:23 am
Posts: 73
Post Re: box-shadow increases document dimensions
Yeah, I also tried to use a sticky footer + pie (like discussed in your other post), and that had size issues on old IEs. It seems that on recent browsers, the shadows don't have a significative size, and on old IEs with PIE, they do.

Anyway, I think that if PIE forced "overflow: hidden", that could cause too much problems.

Looking forward to Jason's answer on that...


Tue Oct 11, 2011 6:45 am
Profile

Joined: Mon Oct 10, 2011 8:21 am
Posts: 5
Post Re: box-shadow increases document dimensions
I could see it causing DOM selection problems if the clipping element was a <div> or it changed the ancestral structure of the PIE'd element, but I think a solution may be achievable by applying overflow:hidden to the <css3-container> elements and then sizing them to clip the shadow.

I'd have a go at implementing a solution myself if I weren't up to my elbows in other cross-browser problems!


Tue Oct 11, 2011 10:07 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.