Welcome to WebmasterWorld Guest from 54.226.22.192

Forum Moderators: not2easy

Message Too Old, No Replies

showing content outside div with hidden overflow

     
10:16 pm on Nov 4, 2013 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 10, 2005
posts:387
votes: 0


I have a centered div on my webpage with overflow set to 'hidden' that I use as a window or frame for my content. Inside, I have a facebook 'send' button that, when clicked, opens a flyout dialog box for the user to enter a message to send with the URL. The problem is that the flyout gets clipped by the hidden overflow of the containing box.

I want to put the facebook button outside the container div in my markup to avoid the hidden overflow. But I also need to make sure that it's absolutely positioned to appear in the frame. What's the easiest way to do this?

CSS positioning for the content frame is (note the div below is centered on the page, but don't rely on that as it's not always the case):

position: fixed;
width: 500px;
height: 500px;
top: 50%;
left: 50%;
margin-top: -250px;
margin-left: -250px;

I tried putting it in a separate div with the same positioning and overflow set to 'visible', but for some reason it doesn't work (even verified that the setting is applied in IE's dev toolbar)
10:23 pm on Nov 4, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 7, 2003
posts:4783
votes: 0


Having a wrapper that's "gained position" (through position: relative, absolute or fixed) is typically a thing that backfires down the road when trying to break out of it, or when trying to find the original edges of the viewport.

Personally: I think your best choice is to go with the flow and not let the wrapper gain position.
10:23 pm on Nov 4, 2013 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 10, 2005
posts:387
votes: 0


Before anyone spends time on this, I think I found the problem; will update soon.
10:29 pm on Nov 4, 2013 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 10, 2005
posts:387
votes: 0


Problem solved -- there was also a child container with overflow hidden that I needed to override.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members