views:

39

answers:

4

Hi,

i have this page.

How to align center-to-center horizontally the labels and the fields?

Regards

Javi

A: 

The easiest way is to simply add padding-top to the labels.

There's no inherent way in CSS of expressing the relative alignment of two elements, but just establishing good margins and padding is almost always sufficient.

VoteyDisciple
A: 

The only real way to do it is with JavaScript.

http://www.nealgrosskopf.com/tech/thread.php?pid=37

Nate Zaugg
Ahh, I thought you were talking about the content boxes. But hey, still useful.
Nate Zaugg
A: 

Try this:

#contenedor_formularios label{
padding-top:4px;
}
GaVrA
A: 

line-height is the best option when you need to vertical-align text (non-wrapping text, that is).

So, i tested it on firebug and adding line-height:20px to the label element seems to do the trick.

Soska