[Resolved] Issue with negative margins on mobile view

Home Forums Support [Resolved] Issue with negative margins on mobile view

Home Forums Support Issue with negative margins on mobile view

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2291001
    Mohammed

    Hi,

    thank you very much for your themes and blocks.

    I’m having an issue trying to get a headline on mobile view on the next grid item with negative margin. It’s not working.

    Here’s the original example i’m trying to replicate: https://elementor.com/library/template-kit/bread-bakery/preview/

    You can see in the second section, on mobile the Welcome headline is on the next grid.

    Here’s my page with GB: https://wpanis.space/

    #2291030
    Mohammed

    Sorry, forget to past the license key. It’s done.

    #2291198
    David
    Staff
    Customer Support

    Hi there,

    The only easy way to do that would be to have an additional headline specifically for mobile:

    1. Select the headline block containing the word “Welcome” and in Advanced > Additional CSS Class(es) add: hide-on-mobile
    2. Add another Headline block with the word “Welcome” before the other headline, and give it Additional CSS Class(es): hide-on-desktop hide-on-tablet

    #2291529
    Mohammed

    Thanks,

    i thought about that, i’v just wanted to see if it can be done with negative margin.

    #2291552
    David
    Staff
    Customer Support

    It would be tough with negative margins, as the vertical position will vary depending on the screen size, so it may look fine on one device but not so on another.

    #2291565
    Mohammed

    I don’t get it, vertical position is not affected by the screen size?

    #2291843
    David
    Staff
    Customer Support

    On smaller screens text may not fit onto one line and will wrap to multiple lines. When that happens you would need to adjust the negative margin.

    If you think you can do it then go for it, if you switch to Mobile Preview you can set negative margins specifically for that block.

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