Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Footer background = page background ?

Footer background = page background ?

Scheduled Pinned Locked Moved General Discussion
7 Posts 4 Posters 63 Views
  • 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.
  • H Offline
    H Offline
    Henry
    wrote on last edited by
    #1

    Hey there,

    i am really struggeling on this one. I want the same footer on every page with the background of that page.
    Some pages are just colored and some have background images. The problem is that the footer always uses the global background color.

    • i already set the footer-backgroundcolor to transparent

    • i used a transparent .png as global background image

    is there a way to make footer-background transparent?

    I am not looking for this code :

    #footer-region{
    background-color: transparent;
    }
    

    or this

    .slug-page #footer {
        background-color: transparent;
    }
    

    Thanks for any help

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      i think the body color is not set, only the color of the current grid that you see.
      the footer is a different grid
      so the footer will always have the background that you set in the footer

      put this in lay options → custom <head> content:

      <script>
      window.laytheme.on("newpageshown", function(){
          var color = jQuery("#grid").css('background-color');
          jQuery("#footer").css('background-color', color);
      })
      </script>
      
      1 Reply Last reply
      0
      • arminunruhA Offline
        arminunruhA Offline
        arminunruh
        Global Moderator
        wrote on last edited by
        #3

        this will always take the bg color of the current page and set the footer to it

        1 Reply Last reply
        0
        • A Offline
          A Offline
          auditoryscenes
          wrote on last edited by
          #4

          I've looked around for the similar issue too. Thanks for the code, it works for me!

          1 Reply Last reply
          1
          • A Offline
            A Offline
            auditoryscenes
            wrote on last edited by
            #5

            Hello, I also have a follow-up question. The code works in the desktop version, but it seems not working for the mobile. Is there any solution for this? Thank you very much!

            F 1 Reply Last reply
            0
            • A auditoryscenes

              Hello, I also have a follow-up question. The code works in the desktop version, but it seems not working for the mobile. Is there any solution for this? Thank you very much!

              F Offline
              F Offline
              felix_rabe
              wrote on last edited by felix_rabe
              #6

              @auditoryscenes maybe you need to change #grid to #custom-phone-grid and/or #footer to #footer-custom-phone-grid, depending on your layout.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                auditoryscenes
                wrote on last edited by
                #7

                @felix_rabe thanks! It works!

                Just in case someone also needs this:

                <script>
                window.laytheme.on("newpageshown", function(){
                var color = jQuery("#custom-phone-grid").css('background-color');
                jQuery("#footer-custom-phone-grid").css('background-color', color);
                })
                </script>

                1 Reply Last reply
                1
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                I also code custom websites or custom Lay features.
                šŸ’æ Email me here: šŸ’æ
                info@laytheme.com

                Before you post:
                1. When using a WordPress Cache plugin, disable it or clear your cache.
                2. Update Lay Theme and all Lay Theme Addons
                3. Disable all Plugins
                4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                This often solves issues you might run into

                When you post:
                1. Post a link to where the problem is
                2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                Online Users
                V
                visch
                M
                MATTOFIRE
                Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                laytheme.com
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Recent
                • Tags
                • Popular
                • Users
                • Search