CSS form help

I’m creating a form with HTML and CSS and can never seem to get it to look right. I only want to use the tags <label>, <input… /> and <textarea> and want the label to be next to the input tag with the same width all the way down.

If you look at what I’ve got (below) you can see that the <label> tag centres itself where the textarea is. I want it to display neatly at the top. Does anyone know how I can do this in the simplest way using only those tags and CSS?

csshelp.png

Re: CSS form help

Try this page here:

http://www.tbs-sct.gc.ca/clf2-nsi2/tb-bo/td-dt/atifc-aticf-eng.asp

Jimmy

Re: CSS form help

Perfect, thanks Jimmy!

Re: CSS form help

Better late than never…

If you didnt already solve it, you could do a CSS style like this:

label { text-align: left; vertical-align: top; }

That should make ALL labels on the site have text left and top aligned.

Re: CSS form help

Thanks :slight_smile: my forms look all lovely now hehe.