Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

how to display form horizontally?

no details just give me the answer thanks

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

There's no one answer to this question. There's a number of ways to layout form elements.

You can use flexbox to layout the flex items horizontally using Flexbox's flex-direction property.

Use can use table cells to layout form elements as you would tabular data (not I hasten to add to use as general website layout.

You can use floats to take form elements out of normal document flow. It's really a case of manipulating the Document Object Model so that they don't stack on top of each other in the normal way.