...

View Full Version : vertical-align property in css problem



Stolenwords13
03-13-2005, 05:32 AM
Hi everyone,

Its been a long time since I posted. I still havn't got my blog up and running, and I am working on a new layout.

http://s17.myhostcenter.com/~egmipksb/images/layout.htm

My problem is that I am trying to get the copyright in the middle of the bottom black bar. Its not working for some reason.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>My Blog</title>
<style type="text/css">
body {
background: #000000 url("http://s17.myhostcenter.com/~egmipksb/images/bg.jpg") repeat;
margin: 0;
padding: 0;
font-family: arial, helvetica, verdana, sans-serif;
font-size: 11px;
color: #000;
}

#container {
background: #fff;
border: 0;
margin: auto;
padding: 0;
width: 600px;
}

h1 {
background: #fff url("http://s17.myhostcenter.com/~egmipksb/images/banner.jpg") no-repeat;
margin: 0;
padding: 0;
width: 600px;
height: 165px;
text-indent: -9999px;
}

#top {
background: #000;
margin: 0;
padding: 0;
width: 600px;
height: 30px;
text-indent: -9999px;
color: #fff;
}

#content {
background: #fff;
margin: 0;
padding: 0;
width: 600px;
text-indent: -9999px;
color: #000;
}

#bottom {
background: #000;
margin: 0;
padding: 0;
width: 600px;
height: 30px;
font-family: arial, helvetica, verdana, sans-serif;
font-size: 11px;
color: #fff;
text-align:center;
vertical-align: middle;
}
</style>
</head>

<body>
<div id="container">
<h1>Banner</h1>
<div id="top">Navigation</div>
<div id="content">Content</div>
<div id="bottom">Copyright 2005 stolenwords13, all rights reserved.</div>
</div>
</body>
</html>

Any ideas? Thanks!

_Aerospace_Eng_
03-13-2005, 05:44 AM
u can only use vertical align in inline elements, a div is a block element, try line-height instead, or you could try using the method found here (http://www.sitepoint.com/forums/showpost.php?p=1243542&postcount=9)

Stolenwords13
03-13-2005, 05:56 AM
I made it work using padding, but thanks anyways :).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum