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

My media querys don't works!!!! help

I'm using the mobile first technique but when using my media query's styles for desktops, they do not work at all. Im writing this for the media query and don't work.

@media screen and(min-width:1224px) {
 /*Styles*/
}

Please help!!

4 Answers

Hey Gabriel,

The only issue with your CSS is there is no space between and(min-width:1224px).

By making adding a space, like so @media screen and (min-width:1224px), you will find that your media queries work. :)

Hope this helps!

Hey Gabriel,

Do you mind providing your CSS code that you are using?

It will be easier to troubleshoot seeing the big picture.

also, don't forget to format the code so it is easier to read.

.serv-name {
    width: 45%;
    height: auto;
    font-size: 30px;
    padding-top: 5%;
    margin-left: 4%;
}

.serv-list {
    width: 40%;
    height: auto;
    margin-top: 25px;
    padding-left: 8%;
    border-left: 1px solid;
}

.service ul li{
    list-style: none;
    font-size: 45px;
    font-weight: bold;
}






Media querys
/* Desktops and laptops ----------- */

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

.serv-name {
width: 35%;
height: auto;
padding-bottom: 10px;
font-size: 30px;
margin-left: 20%;
padding-top: 5%;
}

.serv-list {
width: 30%;
height: auto;
margin-top: 25px;
text-align: left;
}

.service ul li {
font-size: 42px;    
}
}

I'm new using media querys, just want to learn. thanks a lot!!!

Thanks a lot Calvin!!!

You're welcome!