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

Getting search, select and submit buttons on the same line

I can't quite figure out how to get them all to line up. Does anybody know a good way to do this? Or maybe I'm doing something wrong. Here's a link to my code.

3 Answers

You probably want to use inline-block for that.

Thanks guys, I tried absolute but it didn't work with my container so i changed it to static and floated them over. I'll give inline-block a try though to see which works better.

position: absolute; the top:, right:, left;, or bottom: px; should align it. inspect page to dee where your invisible borders are. add a border to each element to physically see what space each element takes up.

Position absolute, corrupts (the layout/cascade) absolutely by making an element out of normal document flow and should be used with caution. Positioning absolute relative to a parent however can be pretty useful sometimes.