Solved

Vertical Alignment Form/Label

Posted on 2010-08-15
2
713 Views
Last Modified: 2012-05-10
Hello

I am relatively new to CSS and I am struggling to solve this simple problem.

In the attached example, there is a form on the left. I can't get the labels to be vertically aligned with the inputs. The labels are all a bit above the baseline of the text in the inputs (Chrome and IE8). (cf image attached "mismatch")

I am sure it must be simple to fix but I tried all sort of combinations of vertical-aligns on the different div/labels without success.

Thanks in advance
Charles

index.html
style.css
mismatch.png
0
Comment
Question by:cm2187
2 Comments
 
LVL 16

Accepted Solution

by:
HagayMandel earned 125 total points
ID: 33441652
Add to the label span css the following:
padding-top:1px;

This will do it
0
 

Author Closing Comment

by:cm2187
ID: 33441987
actually 3px did the trick!
Thanks!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now