[Support request] Using @media queries with sections and multiple page

Home Forums Support [Support request] Using @media queries with sections and multiple page

Home Forums Support Using @media queries with sections and multiple page

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #486745
    mmarvel

    Hi

    So I have asked about media queries before and got direction to use


    @media
    (max-width: 768px) {
    #generate-section-1.generate-sections-container {
    background-image: url(http://myurl-mobile.jpg);
    }
    }

    But when i have more then one page using sections then this puts the same image on both pages (for example home and blog).

    How do i distinguish between the section1 of different pages in my css?

    thanks. Martha

    GeneratePress 2.0.2
    GP Premium 1.5.6
    #486826
    Leo
    Staff
    Customer Support

    Hi Martha,

    Are you using Tom’s Simple CSS?

    If so it gives a CSS metabox for each page.

    If not then you will need to add page id before the selector like:

    @media (max-width: 768px) {
        .page-id-xxx #generate-section-1.generate-sections-container {
            background-image: url(http://myurl-mobile.jpg);
        }
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.