This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Vantage Premium Media Queries

11 years ago · Last reply by Andrew Misplon 11 years ago

I am attempting to create custom media queries. I have tried both adding my css to the child theme and using the edit css method. Neither is working. For the traditional route i added:

To the header.php associated with my child theme and added the following to my child css file:
@media (max-width: 680px)
body.responsive #primary, body.responsive #secondary {
width: auto;
float: none;
margin-left: -25%;
}
.entry-content h1 {
font-size: 2em;
line-height: 1;
text-transform: uppercase;
}

URL: http://www.neurologicalwellness.com

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Erik Truchan 11 years, 25 days ago

    Sorry I meant to say:

    For the traditional route i added:

    <meta name="viewport" content="width=device-width" />

    To the header.php associated with my child theme and added the following to my child css file:

    @media (max-width: 680px)
    body.responsive #primary, body.responsive #secondary {
    width: auto;
    float: none;
    margin-left: -25%;
    }
    .entry-content h1 {
    font-size: 2em;
    line-height: 1;
    text-transform: uppercase;
    }
  2. Andrew Misplon Staff 11 years, 24 days ago

    Hi Erik

    If responsive layout is activated in Appearance > Theme Settings > Layout then it’s best not to add a second viewport meta tag to your child theme header.

    Your media query is missing curly brackets:

    @media (max-width: 680px) {  /* <-- Open the media query */
    /* My CSS selectors go here, as many as I'd like */
    } /* <-- Close the media query */

    Hope that helps.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread