Jump to content

align text vertically in the middle of div.


seany123

Recommended Posts

firstly i would like to say that im a huge amateur at CSS.. anyway i have this code:

 

CSS:

#container{
    background-image: url('/images/content-bg.jpg');
    margin: 10px auto 10px auto;
    border:2px solid #666;
    width: 810px;
    background-position: top left;
}

#header{
    width: 810px;
    background-position: top right;
height:35px;
}

.header_text{
font-size:21px;
}

 

HTML:

<div id="container">
<div id="header">
    		<div class="header_text">
    <a href="home.php"><img src="image/logo.gif" align="left" height="36" width="144"/><a href="buy.php">Buy</a> | <a href="sell.php">Sell</a> | <a href="account.php">Account</a> | <a href="contact.php">Contact us</a> | <a href="help.php">Help</a>
</div>
</div>
</div>

 

i have tried using "vertical-align:middle;" on all 3 divs but nothing changes.

 

any help would be amazing!!

 

also because im new at CSS and hints and tips would be good also!!

 

sean

Hi Seany have a read  5 post below your post in the same forum I think it's the exact same question, there are some references there to an article. Read it, code it, and if you need help afterwards let us know

http://www.phpfreaks.com/forums/index.php?topic=328566.0

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.