Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question vertical-align property in css problem

    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.

    Code:
    <!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!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I made it work using padding, but thanks anyways .


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •