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!

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

mohammed mayat
mohammed mayat
4,228 Points

skeleton framework, media query for mobile not working

hi guys has anyone use skeleton framework, skeleton framework does not seem to pick up my media query for mobile but does work for tablet, i have used bright colours to see if media query is working fiddle https://jsfiddle.net/y20ahbwv/

@media (min-width: 778px) and (max-width: 1024px){
    body{
    background-color: yellow;
    }
    .logo a{
    font-size: 1em;
    color: hotpink;
    text-decoration: none;
    text-transform: uppercase;
    padding: 2px 10px 0 10px;
    margin: 0;
}

    p.copyright{
    text-align: center;
    color: yellow;
    font-size: 1em;
}
}

Mod Note Edited code with Forum Markdown for clarity.

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,247 Points

Hi there,

As far as i can see the media queries are working. They'll always show up in the browser but your devices will need something else.

In order for the changes to show up on most devices you will need to use a Viewport Meta tag in your HTML.

Put something like this

<meta name="viewport" content="width=device-width, initial-scale=1.0">

In the head part of every page in your document. Good luck!

mohammed mayat
mohammed mayat
4,228 Points

i can get tablet styles to work but i cant seem to get mobile styles to work

http://mmayat.x10host.com/portfolioSkeleton/indexTwo.html