Horizontal and Vertical centered div

webwss's Avatar, Join Date: May 2009
Light Poster
Can anybody share code for Horizontal and Vertical centered div as I am not able to get it.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Try

HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
div.album {
padding-top:25%;
height:50%; 
width:100%; 
background-color: green; 
text-align:center;
vertical-align:middle;
}
</style>
</HEAD>
<BODY>
<div class="album">
This is some text
</div> 
</BODY>
</HTML>