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 CSS Layout Basics Getting Started with CSS Layout Using a Mobile First Approach

yannis sousanis
yannis sousanis
7,199 Points

I tried this on my own and it worked when it the screen when it was small but when I full expanded it the width was 100%

  • { box-sizing: border-box; }

body { font-family: "michroma", sans-serif; background-color: lavender; }

h1 {

margin-top: 3em;
margin-left: 10%;

}

.wrapper { padding-left: 1em; padding-right: 1em; background-color: lightgrey; margin: 0 auto;

}

.pers-info { text-align: right; float: right; }

/* ================================= Media Queries ==================================== */

@media (min-width: 769px) { .container { width: 80%; max-width: 800px; margin: 0 auto; }

} This is the css code I used . What is wrong?

1 Answer

Emmanuel Molina
Emmanuel Molina
9,268 Points

Seems good. Is the .container class correctly written in your HTML ?