Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


How to extend the borders of the "DIV Wildlife", so they become full bleed and have the same width of Lake Tahoe H1.

I was playing a little with padding and margins, but no matter what I do I can't expand the padding of the "wildlife" DIV element, so it matches the length of the H1 Lake Tahoe.

Basically, I want the grey block that wraps the text around, to become full bleed and expand from left to right, covering the full width of the browser and not be limited to stay within 3/4 of the page.

I found the following online on CSS-Tricks (https://css-tricks.com/full-browser-width-bars/)

.wildlife {
color: white;
background-color: #434a52;
margin: 0 -XXXpx;

The value of "XXX" (to be changed with a number) should match the H1 pixel width. I tried using Chrome DevTools hovering-over the H1 block to find out its width in pixels, but couldn't find the exact measure.

This however is causing the text to be chopped on the let side, and I am not sure how to correct this.

Overall I believe this CSS declaration doesn't fit my needs and creates confusion.

Any suggestions?

1 Answer

Thanks for the source