I am trying to figure out the overflow property
So to middle an element using margin:auto
property it has width
defined but,
what is the requirement for centering an element vertically with respect to its container/parent?
With current set up overflow happens so,
when does the overflow auto expands the container to fit the overflow element ???
div {
margin: 200px auto;
height: 100%;
width: 60%;
border: 10px solid red;
text-align: center;
}
body {
height: 300px;
min-height: 500px;
padding: 0;
border: 10px solid yellow;
overflow: auto;
}
<div>
somet text
</div>