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

HTML

Background

My html form for some reason is horizontal. Also, it has a white background that I cannot get rid off. How do I get rid of the white background, and make the form vertical.

Stone Preston

<form id="Form">
            <input type="text" name="name" placeholder="Your name goes here..."/><br>
            <input type="email" name="name" placeholder="Email"/><br>
            <textarea name="message" placeholder="Anything you would like to tell us? It could even be about your dog, or imaginary dragon"></textarea><br>
            <input type="submit" value="send"/>
        </form>
Stone Preston
Stone Preston
42,016 Points

can you post your code?

<form id="Form">
            <input type="text" name="name" placeholder="Your name goes here..."/><br>
            <input type="email" name="name" placeholder="Email"/><br>
            <textarea name="message" placeholder="Anything you would like to tell us? It could even be about your dog, or imaginary dragon"></textarea><br>
            <input type="submit" value="send"/>
        </form>

Stone Preston idan ben yair

1 Answer

idan ben yair
idan ben yair
10,288 Points

Hi Steven,

You can make the form vertical by applying display: block; to the form. you can also change the background color by applying background-color: red;

form {
  display: block;
  background-color: red; /* or which ever color you'd like */
}

Let me know if that helped :)

P.S

Stone is right we do need to see your code to know exactly what is the issue.

<form id="Form">
            <input type="text" name="name" placeholder="Your name goes here..."/><br>
            <input type="email" name="name" placeholder="Email"/><br>
            <textarea name="message" placeholder="Anything you would like to tell us? It could even be about your dog, or imaginary dragon"></textarea><br>
            <input type="submit" value="send"/>
        </form>

thanks

idan ben yair