Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Custom Lightbox Background for Each Project

    Addons
    2
    10
    417
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sebastianpetrov last edited by

      Hello,

      I hope you're well.

      Please see the project link and code below. Would you let me know where I've gone wrong?

      I was using some code to get a custom lightbox background colour on some projects. It stopped working and I can't figure out why.

      When I browse the link I get the lightbox bg as set in the lightbox settings: #e5e5e5
      I am trying to override it to #fafafa

      http://sebastianpetrovski.com/lauren-trend-for-oyster-magazine

      /* lightbox bg lauren trend for oyster*/
      .type-project .id-356 .lightbox-bg {
          background-color: #fafafa !important;
      }
      
      1 Reply Last reply Reply Quote 0
      • mariusjopen
        mariusjopen Global Moderator last edited by

        Dear @sebastianpetrov

        body.lightbox-css-on #lightbox-region .lightbox-bg {
            background-color: red !important;
            opacity: 1;
        }
        

        That does not work?

        Best!

        Marius

        www.mariusjopen.world

        1 Reply Last reply Reply Quote 0
        • S
          sebastianpetrov last edited by

          Hey Marius!

          I think that would target all pages?

          I tried the below - is there another way?

          /* lightbox bg lauren trend for oyster*/
          .type-project .id-356 body.lightbox-css-on #lightbox-region .lightbox-bg {
              background-color: #fafafa !important;
          }
          1 Reply Last reply Reply Quote 0
          • mariusjopen
            mariusjopen Global Moderator last edited by

            Dear @sebastianpetrov
            it's good to know that it in general works. Now you need to narrow it down.

            You need to add the class which limits it to the pages which you need.

            Best!

            Marius

            www.mariusjopen.world

            S 1 Reply Last reply Reply Quote 0
            • S
              sebastianpetrov @mariusjopen last edited by

              @mariusjopen

              sorry Marius - the code in general doesn't work and targeting a specific page doesn't work either.

              Any ideas?

              1 Reply Last reply Reply Quote 0
              • mariusjopen
                mariusjopen Global Moderator last edited by

                Dear @sebastianpetrov
                it works.
                I just tested again

                .slug-lauren-trend-for-oyster-magazine.lightbox-css-on #lightbox-region .lightbox-bg {
                    background-color: red !important;
                    opacity: 1;
                }
                

                Best!

                Marius

                www.mariusjopen.world

                1 Reply Last reply Reply Quote 0
                • S
                  sebastianpetrov last edited by

                  Hi Marius,

                  Thanks so much for your help - its not working for me - on multiple computers - and I am using incognito windows to prevent the browser loading from a cache of any sort.

                  Maybe something else is interfering?

                  Here is all the code in the custom css and html for desktop:

                  /* dummy */
                  /* site title */
                  body.slug-dummy .sitetitle.txt .sitetitle-txt-inner span{
                      display: none;
                  }
                  
                  /* navigation info */
                  body.slug-info nav.primary a{
                  	display: none;
                  }
                  
                      /* navigation for info page */
                  body.slug-info nav.second_menu a{
                  	display: none;
                  }
                  
                  /* site title info */
                  body.slug-info .sitetitle.txt .sitetitle-txt-inner span{
                      display: none;
                  
                  /* s */
                  /* site title */
                  body.slug-s .sitetitle.txt .sitetitle-txt-inner span{
                      display: none;
                  }
                  
                  .flickity-page-dots .dot {
                      display: inline-block;
                      width: 3px;
                      height: 3px;
                      margin: 1px;
                      margin-top: 8px;
                      margin-right: 8px;
                      margin-bottom: 8px;
                      margin-left: 8px;
                  }
                  
                  div.instagram-button img{
                      height: 25px!important;
                  }
                  
                  .instagram-button a:hover {
                      opacity: .5!important;
                  }
                  
                  /* lightbox bg out for duel magazine*/
                  .type-project.id-288 .lightbox-bg {
                      background-color: #fafafa !important;
                      opacity: 1;
                  }
                  
                  /* lightbox bg televised for ones2watch*/
                  .type-project .id-299 .lightbox-bg {
                      background-color: #fafafa !important;
                  }
                  
                  /* lightbox bg lauren trend for oyster*/
                  .slug-lauren-trend-for-oyster-magazine.lightbox-css-on #lightbox-region .lightbox-bg {
                      background-color: #fafafa !important;
                      opacity: 1;
                  }
                  
                  /* site title for project pages */
                  body.type-project .sitetitle.txt .sitetitle-txt-inner span{
                      display: none;
                  }
                      
                  
                  /* site title for projects page */
                  body.type-page .sitetitle.txt .sitetitle-txt-inner span{
                      display: none;
                  }
                  
                  /* site title for projects page */
                  body.slug-landing .sitetitle.txt .sitetitle-txt-inner span{
                      display: none;
                  }
                  
                  /* navigation landing */
                  body.slug-landing nav.primary a{
                  	display: none !important;
                  }
                  	
                  	    /* navigation for landing page */
                  body.slug-landing nav.second_menu a{
                  	display: none !important;
                  }
                  1 Reply Last reply Reply Quote 0
                  • mariusjopen
                    mariusjopen Global Moderator last edited by

                    Dear @sebastianpetrov
                    yes. Try to delete that code and only insert the one which I gave you.

                    If it still does not work - let us know :-)

                    Best!
                    Marius

                    www.mariusjopen.world

                    1 Reply Last reply Reply Quote 0
                    • S
                      sebastianpetrov last edited by

                      Thank you so much for your help with everything site related - I'm so happy with how it is at the moment.

                      And guess what the problem was...

                      A missing "}"

                      1 Reply Last reply Reply Quote 0
                      • mariusjopen
                        mariusjopen Global Moderator last edited by

                        Dear @sebastianpetrov
                        de nada. I am here to help.

                        Yes. It is the details.

                        Sometimes it is good to copy the CUSTOM CODE into an editor to check the syntax.

                        Best!

                        Marius

                        www.mariusjopen.world

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Before you post

                        Use the Search Feature. Maybe there is already a solution to your issue.

                        1. Update Lay Theme and all Lay Theme Addons
                        2. Disable all Plugins
                        3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
                        4. Now see if your problem solved itself
                        5. Go here, see if your problem is listed here:
                        Troubleshooting

                        When you post:
                        1. Post a link to where the problem is
                        2. If the problem is difficult to explain, post screenshots / link to a video to explain it

                        Thanks!

                        Online Users

                        B
                        F
                        A
                        G
                        D

                        Recent Topics

                        • K

                          Unable to update lay theme / to login wp admin

                        • S

                          Theme crashed - because of Polylang?

                        • A

                          New button feature not available

                        • A

                          carousel addon not working after update

                        laytheme.com