[Resolved] Padding Left/Right Non Mobile

Home Forums Support [Resolved] Padding Left/Right Non Mobile

Home Forums Support Padding Left/Right Non Mobile

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #196185
    Sean

    I know this is probably a strange one. So I’m looking to add padding on the left and right side of the website. Padding that would be transparent, and expose the background image that I have selected picked for Body. I thought it would be an option in Element Spacing, no luck. But I want like 20px padding on both sides while viewing the website in desktop view. While in mobile/tablet view however, the website will not have padding.

    #196217
    Tom
    Lead Developer
    Lead Developer

    You could try something like this:

    @media (min-width: 769px) {
        body {
            padding-left: 20px;
            padding-right: 20px;
        }
    }
    #196223
    Sean

    Works Flawlessly, thank you.

    #196224
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #208822
    inma_b_p

    Hello

    I have a very similar problem.
    I want to have a padding-left of 100px in the desktop version and only 20px in the mobile version.

    I can not fit it with the element spacing neithe with the CSS.
    May I have to deactivate the element spacing in order to get this code will work?


    @media
    (max-width 768px) {
    .one-container .site-content {
    padding-left: 10px;
    padding-right: 10px;
    }
    }


    @media
    (min-width: 769px) {
    .one-container .site-content {
    padding-left: 100px;
    padding-right: 100px;
    }
    }

    My website is: elcucharonverde.com

    Thanks in advance.

    Lada

    #208843
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I think we need a Mobile Spacing section with the spacing add-on.

    Make your CSS a little more specific:

    @media (max-width 768px) {
        body.one-container .site-content {
            padding-left: 10px;
            padding-right: 10px;
        }
    }
    #209758
    inma_b_p

    Thanks

    I’m going to test it

    #209805
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

    #209873
    inma_b_p

    Thank you so much Tom

    It works perfectly

    Lada

    #209889
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.