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. Bug Reports
  3. Left/Right Padding on Mobile version for Horizontal Lines in grid

Left/Right Padding on Mobile version for Horizontal Lines in grid

Scheduled Pinned Locked Moved Bug Reports
10 Posts 3 Posters 201 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.
  • S Offline
    S Offline
    samvelenne
    wrote on last edited by samvelenne
    #1

    Hi,

    I was busy developing my website and hit a roadblock.
    When i look at the mobile version there is padding on the left and right side of the rows in the grid.
    When i set the padding to 0px for the following (and right side):

    @media (max-width: 600px)
    .lay-content.nocustomphonegrid #grid .row, .lay-content.nocustomphonegrid .cover-region-desktop .row, .lay-content.footer-nocustomphonegrid #footer .row {
    padding-left: 0px;
    }

    everything has no padding, but i only want the padding to be 0px for the horizontal lines and i want the text etc. to keep the padding. How could i solve this. I don't stumble upon this issue in the desktop version, it's only on the mobile version that the horizontal lines don't 'bleed' from the page.

    I wish i could share the website with you, but it's not online yet.

    With kind regards,

    Sam

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

      Dear Sam

      @samvelenne

      "When i look at the mobile version there is padding on the left and right side of the rows in the grid."

      Are you not able to set this padding within your phone layouts Frame settings?Screen Shot 2021-11-08 at 11.36.35 AM.png

      "but i only want the padding to be 0px for the horizontal lines"

      Maybe i have mis-understood and even with the frame settings set to 0 the horizontal lines are still a smaller width (that is the issue you are talking about)

      The following should help you with applying custom CSS to just the horizontal lines:

      body #custom-phone-grid .lay-hr { 
      }
      

      Hope this helps Sam & best wishes ✨
      Richard
      1 Reply Last reply
      0
      • S Offline
        S Offline
        samvelenne
        wrote on last edited by
        #3

        Thanks a lot Richard, this helped solve the issue!
        All best and thank you again, Sam

        R 1 Reply Last reply
        0
        • RichardR Offline
          RichardR Offline
          Richard
          Global Moderator
          wrote on last edited by
          #4
          @samvelenne

          Great to hear Sam! Have a wonderful day & thank you as always for supporting Lay Theme ✨

          1 Reply Last reply
          0
          • S samvelenne

            Thanks a lot Richard, this helped solve the issue!
            All best and thank you again, Sam

            R Offline
            R Offline
            Remco van Dun
            wrote on last edited by
            #5

            @samvelenne
            Same thing I was looking for!
            Do you mind sharing how you got it to work?
            Been trying a little but the solution suggested above didn't work yet.

            1 Reply Last reply
            0
            • RichardR Offline
              RichardR Offline
              Richard
              Global Moderator
              wrote on last edited by
              #6

              Dear @Remco-van-Dun

              You are having issue with the Horizontal Lines on Mobile?
              ( Something similar?)

              Wish to help if i can, are you able to post a link to your website?
              What exactly needs doing with the Horizontal lines 🌝


              Talk soon & best wishes Remco
              Richard
              R 1 Reply Last reply
              0
              • RichardR Richard

                Dear @Remco-van-Dun

                You are having issue with the Horizontal Lines on Mobile?
                ( Something similar?)

                Wish to help if i can, are you able to post a link to your website?
                What exactly needs doing with the Horizontal lines 🌝


                Talk soon & best wishes Remco
                Richard
                R Offline
                R Offline
                Remco van Dun
                wrote on last edited by Remco van Dun
                #7

                @Richard
                Thanks for asking.

                On this temporary website you can see what I was trying to achieve.
                https://reneebus.remcovandun.nl/under-the-beech-tree-i/

                Underneath the carousel there's a horizontal line that becomes a line with padding on both sides when switched to mobile. I'd like all horizontal lines to go from edge to edge of the device. I've stretched the line over the gridder's edge to the max width...

                Strangely the line in footer (a page) underneath each project info somehow works fine? Which is made the same way?

                EDIT: Oh I remember, I've made a custom phone layout for the footers... which I dont want to do for every project, so was wondering if there's a way to overrule the horizontal line padding so it goes full phone width without a custom phone layout?

                1 Reply Last reply
                0
                • RichardR Offline
                  RichardR Offline
                  Richard
                  Global Moderator
                  wrote on last edited by
                  #8

                  Dear Remco

                  @Remco-van-Dun

                  Will need to see if this suits with some tests, hope there are no bugs :)

                  The horizontal line is 100% of it's parent container (row). It's parent container is not 100% of the total browser width. The row has a left & right padding of 5vw. Give the horizontal line a width of 100vw ( calculated as 100% of the viewport width (browser width) & then move it left 5vw to match the padding.

                  .lay-hr {
                      width: 100vw;
                      transform: translateX(-5vw);
                  }
                  

                  The above code is likely added to > Lay options > Custom CSS & HTML > Custom CSS for mobile >

                  If problem occurs you may need to specify with:

                  .row .lay-hr {
                      width: 100vw;
                      transform: translateX(-5vw);
                  }
                  

                  Result - Full-width horizontal line:
                  Screen Shot 2022-01-05 at 2.51.56 PM.png


                  Best wishes Remco & happy new year! ✨
                  Richard
                  R 1 Reply Last reply
                  0
                  • RichardR Richard

                    Dear Remco

                    @Remco-van-Dun

                    Will need to see if this suits with some tests, hope there are no bugs :)

                    The horizontal line is 100% of it's parent container (row). It's parent container is not 100% of the total browser width. The row has a left & right padding of 5vw. Give the horizontal line a width of 100vw ( calculated as 100% of the viewport width (browser width) & then move it left 5vw to match the padding.

                    .lay-hr {
                        width: 100vw;
                        transform: translateX(-5vw);
                    }
                    

                    The above code is likely added to > Lay options > Custom CSS & HTML > Custom CSS for mobile >

                    If problem occurs you may need to specify with:

                    .row .lay-hr {
                        width: 100vw;
                        transform: translateX(-5vw);
                    }
                    

                    Result - Full-width horizontal line:
                    Screen Shot 2022-01-05 at 2.51.56 PM.png


                    Best wishes Remco & happy new year! ✨
                    Richard
                    R Offline
                    R Offline
                    Remco van Dun
                    wrote on last edited by
                    #9

                    @Richard

                    Thanks again for your help, that seems to have done the trick!

                    1 Reply Last reply
                    1
                    • RichardR Offline
                      RichardR Offline
                      Richard
                      Global Moderator
                      wrote on last edited by
                      #10
                      @Remco-van-Dun

                      Wonderful! best wishes ⭐️

                      1 Reply Last reply
                      0
                      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
                      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