PDA

View Full Version : When creating forms with css rules


urbanrays
09-24-2009, 09:35 PM
Hi

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

DWcourse
09-24-2009, 10: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;
}

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