[Support request] CCS to affect only one page

Home Forums Support CCS to affect only one page

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1409346
    Ben

    Hey guys,

    I’ve added in some css to to put a box shadow around some columns;

    .gb-grid-wrapper > .gb-grid-column > .gb-container {
    box-shadow: 0px 2px 16px 0px rgba(0,0,0,.1);
    }

    Works perfectly.

    But it’s affected the site globally. How can I affect just one page?

    Thanks

    Ben

    #1409436
    David
    Staff
    Customer Support

    Hi there,

    each page has a unique ID that is displayed as a body class.
    Find the ID of the page, by checking its URL in the editor.

    Then you can add it to your CSS selector like so:

    .page-id-44 .gb-grid-wrapper > .gb-grid-column > .gb-container {

    Alternatively and more flexible method you can do this:

    1. Select the Parent Grid(s) you want to apply the shadow to. Make sure you select the parent:

    https://docs.generateblocks.com/article/grid-overview/#editing-our-grid-block

    2. Once selected go to Settings sidebar > Advanced and add a Additional CSS class of: shadows

    3. Then use this CSS selector:

    .gb-grid-wrapper.shadows > .gb-grid-column > .gb-container {

    This method i prefer as you can set it selectively

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.