I used the following article from sitepoint to go through creating an form in css?

However, I ran into an issue, it gave the option of aligning labels to the top of inputs, aligning labels to the left of inputs, or aligning labels to the right of inputs. The issue I had was that it used and ordered list to layout the labels and inputs. This caused a problem for me because I wanted some of the fields to appear on the same line, but because they put each element in an li, it broke to the next line. For example, I wanted to create a form that has a left-aligned labels or right and consists of of the following:

First Name, Last Name (On one line) Address City,State, Zip (On one line) Phone

Using the example provided from the link above, it created the form with the labels aligned correctly, but every field was on its own line.

  • You should post the problematic HTML and CSS so we can see what problems you're having, a live example is always very helpful as well. Kyle Sevenoaks over 6 years ago

1 answer

0
points

So put both fields in the same list item? It's not really clear what your question is.

Answered over 6 years ago by Nathan Duran