4 replies [Last post]
pingu
pingu's picture
Offline
Enthusiast
UK
Last seen: 6 years 3 weeks ago
UK
Timezone: GMT+1
Joined: 2006-07-24
Posts: 63
Points: 5

Hi, I have a problem with the banner of my site http://reapfuels.co.uk/default.html. The "sign up" and "name" are not vertically aligned, why is this? It works fine if either the input is not present, or the spans are not floated. I would appreciate any help. Thanks

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 46 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Hi Have you set a

Hi

Have you set a line-height for each bit? Then set vertical-align to middle. Might work

pingu
pingu's picture
Offline
Enthusiast
UK
Last seen: 6 years 3 weeks ago
UK
Timezone: GMT+1
Joined: 2006-07-24
Posts: 63
Points: 5

Thanks ClevaTreva, i used

Thanks ClevaTreva, i used this:

div {vertical-align: bottom; line-height: 2.2em;}

and it seems to work, i dont understand why though.

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 46 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Because by not setting it

Because by not setting it the browser sets the least it can get away with, which varies from element to element.

pingu
pingu's picture
Offline
Enthusiast
UK
Last seen: 6 years 3 weeks ago
UK
Timezone: GMT+1
Joined: 2006-07-24
Posts: 63
Points: 5

thankyou!

thankyou!