so I'm using the following code to change the contents of a div:
document.getElementById("boxed").innerHTML = document.getElementById("aboutus").innerHTML;
And the following is the CSS code behind the div "boxed":
.boxed
{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
width: 90%;
min-height: 90%;
height:auto;
top:50%;
background-color:#F5F5F5;
}
How can I keep the div centered vertically while at the same time allowing for vertical resizing based on the content within? I don't want to use overflow; I want the div itself to change size when I click a button that executes the Javascript code.