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

Hello.

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")
(div)
(a href:"http://..."][img id="logo" src="http://..." alt="B..."/)(/a)
(h1)HOME(/h1)
(/div)
(h2)News Home(/h2)
(/div)

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.

Thanks!