Bluemagica
Bluemagica

Reputation: 5158

Help me style a form with css

http://jsfiddle.net/R9ejR/

I want to display some of the fields like height, weight, physique, e.t.c to show side-by-side, so I wrote a simple css showOnSide, which simply float:left the content, but when I add this class after an formelement, the element becomes unclickable. Any ideas?

Upvotes: 1

Views: 98

Answers (2)

Justus Romijn
Justus Romijn

Reputation: 16019

If you don't need the position:relative, then remove that. (thanks Maus).

Otherwise:

Solution in jsFiddle: Solution with clear and floats

It is hard to explain, but your li element after the floated one was sitting on top of your input element. Now the floating works as expected. Clearing is needed to force the listitems without ShowOnSide beneath the floats.

Upvotes: 0

maus
maus

Reputation: 182

Classes have to be separated by a single space, like li class="form_element showOnSide"

Upvotes: 1

Related Questions