Welcome to WebmasterWorld Guest from 54.226.62.26

Forum Moderators: not2easy

Message Too Old, No Replies

showing content outside div with hidden overflow

     

sssweb

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

5+ Year Member



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)

swa66

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

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



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.

sssweb

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

5+ Year Member



Before anyone spends time on this, I think I found the problem; will update soon.

sssweb

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

5+ Year Member



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

Featured Threads

Hot Threads This Week

Hot Threads This Month