• Resolved mattyblob

    (@mattyblob)


    Hey,

    Is there a way to darken the rest of a page when the AJAX results are being shown on desktop?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Damian Góra

    (@damian-gora)

    Hi,

    Yes, it’s possible, but every theme requires a different way to achieve it.

    I paste here one CSS that makes the background darker. Of course, it will not work in your case, but you or your Web Developer will be able to understand how it should work.

    
    body.dgwt-wcas-open > #wrapper > #main:after,
    body.dgwt-wcas-open > #wrapper > #footer:after,
    body.dgwt-wcas-open > #wrapper #top-bar:after,
    body.dgwt-wcas-open > #wrapper #wide-nav:after {
      content: '';
      display: block;
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      right: 0;
      margin: auto;
      width: 100%;
      z-index: 1;
      background: rgba(0,0,0,0.6);
    }
    

    As you see, you have to cover all elements excluding the search bar and its parent’s elements.

    Best
    Damian

    Thread Starter mattyblob

    (@mattyblob)

    Perfect – thank you!

    Thread Starter mattyblob

    (@mattyblob)

    Just wanted to leave this here in case it helps someone else. This worked perfectly for me:

    body.dgwt-wcas-open:after {
            content: "";
            display: block;
            position: fixed;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            z-index: 10;
            background-color: rgba(0, 0, 0, 0.6);
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Darken Rest of Page’ is closed to new replies.