No replies
mellen0157's picture
New England
Last seen: 10 years 8 weeks ago
New England
Timezone: GMT-4
Joined: 2012-02-23
Posts: 4
Points: 7


I'm trying to vertically align an image within a div using CSS, but can't seem to get it to work. Here is my code (I'm using the wrong kind of brackets so the post doesn't use it):

(div id="head")
(a href:"http://..."][img id="logo" src="http://..." alt="B..."/)(/a)
(h2)News Home(/h2)

This is part my CSS in the order it appears, I have more within the CSS itself, but these are the only parts I think apply to this question:

h1 {font-family:Geneva,...; color:#FFFFFF; font-size:400%; vertical-align:middle;}
#head {background-color:#000066; padding:8px; height:auto;}
#logo {float:left; vertical-align:middle;}

The vertical-align for the h1 DOES WORK, the vertical-align for the #logo DOES NOT WORK.