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 trialTaran Albury
Front End Web Development Techdegree Student 5,702 PointsAligning the select tag.
Hello, I am having trouble getting the select tag to align to its corresponding label. Any help will be appreciated :) here is a link to my code on git hub:
https://github.com/TaranAlbury242/project/blob/master/index.html
1 Answer
Mike Hickman
19,817 PointsHi Taran,
Since the selection options are in a div, that div is automatically going to want it's own line. Just add a css property to the <div class="selection"> element in your .css file.
.selection {
display: inline-block;
}
In case you don't have a css file yet, you can do the quick-and-dirty way (not best practice, but it works) and add your style directly into your html page.
<div class="selection" style="display: inline-block;"
Have fun!
Mike
Taran Albury
Front End Web Development Techdegree Student 5,702 PointsTaran Albury
Front End Web Development Techdegree Student 5,702 PointsThank you for the help Mike.