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

Tracy Excell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 Points

How can I add a margin here to create space between my label and select menu?

Hello,

I need a margin between my label "state' and the select menu form. My attempts are not working, any suggestions?

<div class="state"> <label for="state">State:</label><br>

            <select id="state" name="user_state" value ="">
                <option value="Choose-state">Choose State</option>
                <option value="Mississippi">Mississippi</option>
                <option value="Washington">Washington</option>
                <option value="Oklahoma">Oklahoma</option>
                <option value="Texas">Texas</option>
                <option value="Virgina">Virgina</option>    
            </select>
        </div>

1 Answer

Steven Parker
Steven Parker
229,968 Points

There are several options. But perhaps the easiest is an extra <br>.

<label for="state">State:</label><br><br>

If you need a finer adjustment, you could also use CSS.