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

CSS

Project help

Every time i change the font size the image itself either gets bigger or smaller depending on the font size, how can i just keep the image the same size regardless of font size?

https://w.trhou.se/kcox19zy14 ... This is the snapshot of my workspace

How would i do method 1? I'm still learning html & css as i go. I get what you're trying to say with the background, it's just a matter of how do i fix it?

1 Answer

Hey Haki! Good question, I looked at your code and the issue is an easy fix . You referred to it as an image, you need to see it as a background, it's not the image that gets bigger, it's the box itself. Small text needs a small box, big text needs a big box, whenever you make the text bigger, the box becomes bigger and your image adapts since your background is set to cover. You have 2 options here: 1. give a fixed size to the box and adjust the text 2. make the background image fixed. I suggest method 1 since it's better for beginners. Good luck , let me know if you need anything else!

Mod Edit: Changed comment to answer so it may be voted on or marked as best. Thank you!