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
Mark Brady
6,239 PointsHow to style the header background color?
I want the header to be a solid color with no gray spaces on the sides. I'm struggling with finding a solution, because of my form's padding.
Also, any advice on my code would be helpful. (Neatness, readability etc)
Here's a snapshot: https://w.trhou.se/np64na6m12
Thanks in advance!
1 Answer
Ash Scott
435 PointsOn your <h1> you could do a negative margin (Like Twitter Bootstrap does with rows). I added this to your <h1> and it got what you wanted:
background-color: red;
margin: 10px -20px;
http://codepen.io/AshboDev/pen/GjmpyX
Let me know if this is what you were after!
Kind regards, Ash
Mark Brady
6,239 PointsMark Brady
6,239 PointsThanks for your time and help, but I want the entire header/ top part of the form to be a single color. Also, sorry for the late reply.