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. Rounded corners for background colour

Rounded corners for background colour

Scheduled Pinned Locked Moved General Discussion
12 Posts 3 Posters 110 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.
  • D Offline
    D Offline
    dennisbern
    wrote on Mar 24, 2025, 9:53 AM last edited by
    #3

    It does not work when I write the code in "Custom CSS".
    Is some code missing?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alasdair17
      wrote on Mar 24, 2025, 11:12 AM last edited by
      #4

      do you have a link to your website?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dennisbern
        wrote on Mar 24, 2025, 12:54 PM last edited by
        #5

        Sure. The rounded corner should be at the top under the title bar and at the bottom before the footer:

        https://biografie.art/die-eigenen-grenzen-anerkennen-kopie-grafischer/

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alasdair17
          wrote on Mar 24, 2025, 3:06 PM last edited by
          #6

          ahh yeah sorry I just tried myself and it didn't work, I thought that would work for a whole row. If you add the code to the grid id (#grid) it rounds the bottom of the website but not the top, hmm you might want to ask @arminunruh for help.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            arminunruh
            Global Moderator
            wrote on Mar 31, 2025, 2:44 PM last edited by
            #7
            .first-row{
                overflow: hidden;
                border-radius: 10px;
                background: blue;
            }
            .row:last-child{
                overflow: hidden;
                border-radius: 10px;
                background: blue;
            }
            

            or

            if you right click the row on the gridder and give it a class like, 'roundcolour' and then in css type this:

            .roundcolour {
            border-radius: 20px;
            background: blue;
            overflow: hidden;
            }
            

            2 things: your rows dont have a background color so rounding their corners wont show any color with a round shape at the corners.
            also maybe overflow: hidden is needed just like i put in my css

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dennisbern
              wrote on Mar 31, 2025, 7:58 PM last edited by
              #8

              Hey, thanks. Basically, it works if I put background color to rows, but it's still not what I meant: I've given the entire page a background color ("Set Background"), and I only want to round the top corners and the bottom corners of the page background color. If that is possible.

              This code gives rounded corners to the entire row and also to the footer that I have set up.

              I could imagine a workaround: giving each row a background color. But then I would only need to round the top corners for the first row and the bottom corners for the last one.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                arminunruh
                Global Moderator
                wrote on Apr 1, 2025, 5:54 AM last edited by
                #9

                body.id-70 #grid{
                background-color: transparent!important;
                }

                body.id-70 .grid-inner{
                background-color: #fff677!important;
                border-radius: 20px;
                }

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dennisbern
                  wrote on Apr 3, 2025, 9:06 AM last edited by
                  #10

                  Nice ist works. I adapted the code that it works for all pages:

                  body #grid{
                  background-color: transparent!important;
                  }

                  body .grid-inner{
                  background-color: #fff677!important;
                  border-radius: 30px;
                  }


                  One last question: It does not apply to the mobile sites. What code should I add?

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dennisbern
                    wrote on Apr 3, 2025, 10:54 AM last edited by
                    #11

                    And another thing I just recognized is that my code is not really working—or rather, it’s not doing what I want. It rounds the corners of all pages but also sets the background color of all pages to #fff677. However, I have different background colors on different pages.
                    Is there a way to round the corners of all pages automatically while keeping the background color I defined for each specific page?

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      arminunruh
                      Global Moderator
                      wrote 29 days ago last edited by
                      #12

                      maybe this?

                      remove your other css, only have this css:

                      .grid-inner{
                      border-radius: 30px!important;
                      }
                      

                      then in custom <head> content:

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

                      with this js we take the bg color of the grid. we apply it to the inner div.
                      then we set the grid bg color to transparent.

                      we do this for bot normal grids and custom phone layout grids.
                      the css makes the border round.

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

                      12/12

                      Apr 9, 2025, 6:26 PM


                      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
                      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.
                      12 out of 12
                      • First post
                        12/12
                        Last post
                      0
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Search