css newbie here… I am trying to center an object vertically within a div that is relative to the parent div. Here is my relevant css:
#top {
text-align: center;
height: 70%;
background-color: Blue;
}
#centered
{
border: 0;
background-color: White;
height: 50%;
width: 50%;
position: absolute;
left: 25%;
top: 25%
}
I am trying to center the “centered” div vertically within the “top” div. As of right now the “centered” div is vertically centered in the page. I need everything based off percentage, not pixels or ems…
My html is below:
<div id=”top”>
<div id=”centered”>
<object id=”Player” classid=”CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6″ width=”352″ height=”240″>
<param name=”URL” value=”images/wood_is_life.avi”/>
<param name=”autoStart” value=”true”/>
<param name=”uiMode” value=”none”/>
</object>
</div>
</div>
Any help would be greatly appreciated…