• Anonymous User 9824923

    (@anonymized-9824923)


    Hallo, hope you all doing fine.

    I am trying to reduce de margins top and bottom for my content (it has a gallery on it) in lp-text-one .lp-text-content and the code I have is not doing the trick. I need it to work on desktop and mobile. Can somebody help me?

    #lp-text-one .lp-text-content { 	margin-top: 20px!important
    }
    

    Bes regards,

    Iri

    • This topic was modified 1 year, 4 months ago by Anonymous User 9824923.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, Irina! The vertical spacing on the lp-text-one element is the result of padding, not margin. Here is a screenshot of Firefox’s developer tools:

    https://share.cleanshot.com/yqcdzMFn

    The following CSS would remove this spacing:

    #lp-text-one.lp-text {
      padding: 0;
    }

    Note that their is no spacing between these: #lp-text-one.lp-text. This is another reason why your code as-written would not work.

    Please try this and let me know if it helps! Cheers.

    • This reply was modified 1 year, 4 months ago by Zack Krida.
    Thread Starter Anonymous User 9824923

    (@anonymized-9824923)

    Halloooo! Thank you so much for explaining. The code helped, but how I get the same margin top and bottom, mobile and desktop? Because if I correct in desktop, it stays to big of a margin in mobile.

    Best regards,

    Iri

    It looks like you still have the following CSS, which is impacting mobile:

    #lp-text-one .lp-text-content {
      margin-top: 20px !important;
    }

    I believe if you remove this, it will fix the spacing on mobile. Good luck!

    Thread Starter Anonymous User 9824923

    (@anonymized-9824923)

    Hallo @zackkrida, Hope you are fine.

    So… I removed that code and now I don’t have a top margin at all, not in Desktop or mobile view. Actually if I want some margin, I have to use html in the page edition, otherwise it will look like in the 3rd image. No idea what is wrong ??

     
    
    [gallery columns="5" size="medium" ids="22030,22023,22032,22025,22029,22031,22026,22024,22028,22027"]
    
     
    
     
    
     
    https://imgur.com/a/cbgZhGz
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problems with margin top and margin bottom’ is closed to new replies.