How can I display a DIV which is bigger than its ancestor, when the ancestor DIV has style overflow: hidden; position: relative;
?
Here is an example:
HTML:
<div class="container">
<div class="content">
__________________________SHOW_ME
</div>
</div>
CSS:
.container {
position: relative;
padding: 10px;
overflow: hidden;
width: 10em;
border: 1px solid;
height: 50px;
}
.content {
position: absolute;
overflow: visible;
border: 5px solid red;
}
Here is this example on JS Fiddle.
I tried styling the content DIV with various combinations of position: absolute
, overflow: visible
, right: -100px
, but it didn't help.
How can I style the content div so that it is entirely visible?
I cannot modify the parent DIV with container
class, only the content inside.