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

Design

Why does a background image break my design?

Hey folks,

I've been playing around with the responsive design materials using the simple profile site provided on the course. When trying to change the background image for a given resolution, in this case introducing a background image at 260px for mobile, the design breaks, with elements to the left pushing elements to the right out of alignment.

As soon as I remove the background image the design returns to its expected layout. I assumed (obviously incorrectly) that background images didn't interact with the page and I can't identify what might be causing this issue. Does anyone have some idea what I'm missing?

Hi Jason,

Can you post your HTML and CSS please and we'll take a look?

Thanks

-Rich

2 Answers

Can you copy your CSS with the background image tag in and share it here so we can see what you're working with?

I tried posting the code and made a complete hash of it. Oddly enough I opened the page again and it was fine and now I can't reproduce the problem. I'm now wondering if the server its sitting on was having a moment but thanks anyway.