I need help centering the logo and text on my website. I want them to be perfectly centered both vertically and horizontally.
After trying a few different things, this is the HTML code I have come up with:
<html>
<head>
<title>XXX</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
margin:50px 0px; padding:0px; /* Ensuring consistency across browsers */
text-align:center; /* Fix for IE5/Win */
}
#floater {float:left; height:50%; margin-bottom:-120px;}
#Content {
clear:both;
width:500px;
margin:0px auto; /* Centering the content */
text-align:center; /* Counteract to IE5/Win fix */
padding:15px;
height:240px;
position:relative;
}
#text-center{
text-align:center;
font-family:Tahoma, Geneva, sans-serif
}
</style>
</head>
<body>
<div id="Content">
<img src="logo_small.jpg" width="400" height="143">
<p id="text-center">Coming soon</p>
<p id="text-center">more text</a></p>
</div>
</body>
</html>
I am not very familiar with HTML/CSS and would appreciate any guidance on how to achieve the desired centering effect.