CenteredDivScrollOverflowProblem - 2
A perfectly centered div with the "translate trick" applied. When this div is scaled and becomes larger than it's container a part of the top and the left of the div are not reachable / viewable anymore.
by Joep Greuter
HTML
<div id='container'>
<div id='content'>
<p>
centered...
</p>
</div>
</div>
CSS
#container{
position: relative;
width: 400px;
height: 400px;
background-color: gray;
overflow: auto;
}
#content{
position: absolute;
width: 100px;
height: 100px;
top: 50%;
left: 50%;
border: 1px solid red;
transform: translate(-50%, -50%) scale(5);
}