Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML form layout with CSS

Tags:

css

forms

xhtml

I need to build a form for data input, let's say FirstName and LastName. I know how to do this with a table. In the first <td> I'd put a label tag and in the second I'd use an input tag with a type="text" attribute. This way the labels and textboxes would be lined up in two columns.

Is there a way to do this with CSS?

like image 920
user80603 Avatar asked Apr 10 '09 00:04

user80603


People also ask

How do I create a form using HTML and CSS?

Prerequisite: Basics concepts of HTML and CSS like tags, ID, color, margin, padding, font, text field, checkbox, radio button, etc. Approach: The <form> element is used to create an HTML form for user input. Inside the form element, provide different options to the user like name, email, age, etc.


1 Answers

Here's a tutorial for this.

like image 200
Ólafur Waage Avatar answered Oct 09 '22 09:10

Ólafur Waage