WordPress.org

Ready to get started?Download WordPress

Forums

How to override a media query in my stylesheet? (2 posts)

  1. nbostic
    Member
    Posted 1 year ago #

    Since I was told to create my own thread even though it's identical to another unanswered thread:

    My responsive theme has this media query:

    @media only screen and (max-width: 960px)

    I'm trying to change that max-width to 900px in my custom css, but I don't know how. The media query is still triggering when the browser is at 960px wide.

    What should I put in my custom css to override this so that it triggers at 900px?? (I'm using Jetpack's custom css)

  2. Emil Uzelac
    Theme Review Admin
    Posted 1 year ago #

    @media only screen and (max-width: 900px) {
        .example {}
    }

    and

    @media only screen and (max-width: 960px) {
        .grid {
            float: left;
        }
    
        .grid-right {
            float: right;
        }
    }

    Thanks,
    Emil

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags