Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 90,705 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