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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![jose macedo](https://uploads.teamtreehouse.com/production/profile-photos/5531452/micro_BnXo7J7IMAAT0PD.jpg)
jose macedo
6,041 Pointswhy is my class not working
why does my container class's width not setting to 90%? here is my code https://w.trhou.se/tmiz0xyhwq
4 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThe container div
s ARE being set to 90% width. Try adding a border to the container class so you can see it:
border: 1px solid red;
But without the border, the width change is not really visible except on a very narrow window. What did you expect to see?
![Leandro Severino](https://secure.gravatar.com/avatar/625a94224c1725d28f70c8b91a9880e9?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Leandro Severino
12,674 PointsTry this:
******HTML***********
<body> <div class = "container"> <h1> 90% Container </h1> </div> </body>
*******CSS*************
.container {
background: green;
width: 90%;
margin-left: auto;
margin-right: auto;
}
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 Points I got your message, but you'll need to post your code, along with a link to the video or challenge you are working with to make it possible to help you.
![jose macedo](https://uploads.teamtreehouse.com/production/profile-photos/5531452/micro_BnXo7J7IMAAT0PD.jpg)
jose macedo
6,041 Pointssorry itought i added it but i justed added it take a look
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsNow I see your snapshot, but I'm not able to find anything with a class container, nor do I see any CSS rules setting anything to 90%.
![jose macedo](https://uploads.teamtreehouse.com/production/profile-photos/5531452/micro_BnXo7J7IMAAT0PD.jpg)
jose macedo
6,041 Pointshaha ohh sorry it was the wrong one i just updated it again
![jose macedo](https://uploads.teamtreehouse.com/production/profile-photos/5531452/micro_BnXo7J7IMAAT0PD.jpg)
jose macedo
6,041 Pointsi expected my letters to have some space to the left
![Leandro Severino](https://secure.gravatar.com/avatar/625a94224c1725d28f70c8b91a9880e9?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Leandro Severino
12,674 PointsI shared with you a simple example with a link, you could've checked that.
jose macedo
6,041 Pointsjose macedo
6,041 Pointsi fixed it but also doyou know why my header background not showing
Steven Parker
230,688 PointsSteven Parker
230,688 PointsI see the background image when I fork your workspace and preview it. Not sure why you wouldn't!