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

General Discussion

Priyanka Rai
Priyanka Rai
1,108 Points

Media query is not working in responsive CSS file

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

/***************************** TWO COLUMN LAYOUT ******************************/

primary{

width: 50%;
float: left; 

}

secondary{

width: 40%;
float:right;

} } @media screen and (min-width:660px) {

/***************************** PAGE: PORTFOLIO ******************************/

gallery li{

width: 28.33; }

gallery li:nth-child(4n) {

clear:left; } }

/***************************** PAGE: ABOUT ******************************/

.profile-photo{ float: left; margin: 0 5% 80px 0; } } @media screen and (min-width: 660px) {

/***************************** HEADER ******************************/ nav{ background:none; float: right; font-size:: 1.125em; text-align: right; width: 45%; } }

1 Answer

evannex
evannex
2,436 Points

The code you posted is very hard to read, try surrounding it with three back-tick marks(`) before and after next time to make it easier to help.

Where are you media queries in your css? Top, bottom, middle?

They should be at the bottom of your css, in order to work properly.