• Resolved jonatan_jr

    (@jonatan_jr)


    Hello,
    I’m making my simple theme and @media max-width and min-width doesn’t work. In css file I would like to use only @media (max-width 576px)
    but I don’t know why the browsers can’t see it.
    For example, if I change max to min (min-width 576px) then it works but for any resolution even below 576px (I don’t know why).
    I only have one @media in the css file.
    @media (max-width: 576px){
    .home_img img{
    height: 136px;
    }
    .home_txt{
    Font-size: 16px;
    line-height: 24px;
    }
    }
    What could cause the problem?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I generally use

    @media all and (max-width:pixelsize){
    }

    That said, your declaration should work as well. TO understand the issue properly, would require link of the page

    • This reply was modified 4 years, 9 months ago by kaushalsheth.
    Thread Starter jonatan_jr

    (@jonatan_jr)

    Unfortunately, I have no possibility to insert a link ??
    I’ve never had such a problem before, @media used to work without a problem, but it doesn’t want to work on this site.
    To complete the information I’ll add that Theme I’m using I made it myself. Theme is very simple. Standard files -index.php, header.php, footer.php, sidebar.php, functions.php, custom.js, style.css. The only thing that doesn’t work is @media and I was wondering if I need to “activate” somehow @media etc.

    Did you add this meta tag to your header.php file?

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

    Thread Starter jonatan_jr

    (@jonatan_jr)

    @kaushalsheth Thanks a lot, the meta tag was placed but with a mistake
    such was
    <meta content=”width=device-widht, initial-scale=1″ name=”viewport” />
    it all works now

    Thank you very much once again ??

    • This reply was modified 4 years, 9 months ago by jonatan_jr.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘@media max-width problem’ is closed to new replies.