View Full Version : When creating forms with css rules

09-24-2009, 08:35 PM

I always seem to have the same problem when creating forms and hope you lot can help.

I create a label class ie

<label class="signup_tabs">Name</label>

and then I create the input box

<input name="name" type="text" class="signup_name">

all ok upto this point, but as soon as I put, lets for arguments sake say the address below, with "address" being longer text nothing seems to line up.

I have managed to get them all lined up with using the margins, but then I test it at browsershots and some browsers have all the boxes out of alignment.

Is there an easy way of making these all line up or is it a matter of using margins to get them inline.

Thanks in advance people

09-24-2009, 09:45 PM
how about assigning a style like this to your labels?

.mylabels {
width: 200px;
display: block;
float: left;
text-align: right;
padding-right: 12px;

09-25-2009, 08:01 AM
thanks dw will give it a bash later today.