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

Sabine Barzisa
PLUS
Sabine Barzisa
Courses Plus Student 4,385 Points

viewports for 480px I want some div containing img not be displayed

I don't understand why even with my viewport meta tag in html and with media screen in css doc it doesn't work ! I try for hours and I am hopeless

div name is bulle : I wrote in style.css

@media screen and (max-width : 480px) {

.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12 {
    width:100%;
}

#bulle {
    display: none;
}
}

and the img display !!!

6 Answers

James Barnett
James Barnett
39,199 Points

Sabine Barzisa - In the code you posted here, you forgot the closing curly brace to your media query. You opened 3 curly braces but only close 2.

Sabine Barzisa
Sabine Barzisa
Courses Plus Student 4,385 Points

it is present at the end of my code ! I just didn't copy the full code ! should I ?

Sabine Barzisa
Sabine Barzisa
Courses Plus Student 4,385 Points

Got it it was a curly brace missing. Thank very much, you are so helpful.

Chase Lee
Chase Lee
29,275 Points

Are you sure you have your screen size at 480px because the querie works on my screen.

Sabine Barzisa
Sabine Barzisa
Courses Plus Student 4,385 Points

yes I rezise the sceen and make in to a minimum ! until a very small screen !

Sabine Barzisa
PLUS
Sabine Barzisa
Courses Plus Student 4,385 Points

a hashtag because it is a div I want to dissapear while reducing the screen size to 480px

Mike Morales
Mike Morales
19,833 Points

Does img belong some where in your div bulle?

Looks like you're missing a brace to close the code block off...