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


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