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
liam mcinnes
Courses Plus Student 3,517 Pointsimage size not changing
hey guys.
I'm making an website and the image size isn't changing i've tired all sorts of ways but it's weird.
HTML CODE
<div class="main-content"> <!-- <center><img class="bodybg"src="img/body.png"></center> -->
<div class="sides-show">
<img class="test" src="lols.png">
</div>
CSS CODE
.main-content {
background: url("../img/body.png") no-repeat; background-size: 70% 70%; }
.slide-show { width: 70%; height: 100px; border: 2px solid white; }
1 Answer
Steven Parker
243,656 PointsYou say the size "isn't changing". But when should it change?
Do you mean when you resize the window? One way to make that happen is to give the element a size based on a percentage, or on viewport units. Without that kind of specification, the size would not change with the window.
To enable specific analysis of your issue, consider creating a Treehouse Workspace for it. You can then use the snapshot function in the workspace and provide the link to it here.