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

    Hi,

    I have an element with a margin (negative value). When I look at the site with my iPhone, the element is too high up.

    Is there a way to adjust the margin just for tablets or phones without changing it for desktop versions?

    Thanks a Lot.

    Yours, Thomas

    #1152777

    Hey Thomas,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1152894

    Hi Victoria,

    the site is still under construction. You can see the mentioned things in the screenshots: –> Dropbox

    As you can see, the box covers up the image above in phone-mode. So, it is possible to reduce the negative margin dependent of the screen size?

    Thank you. Yours, Thomas.

    PS: Do you a need a login?

    #1153162

    I’ve Set the concerning elements with a custom css-class “mobile-margin”.

    Then I’ve tried this code:

    @media only screen and (max-width:767px)
    .mobile-margin {
    margin-top:-10px !important;
    }

    But unfortunately it doesn’t work.

    #1153296

    Hi venolab,

    Your code does not have enough braces. It should look like this:

    
    @media only screen and (max-width:767px) {
    .mobile-margin {
        margin-top:-10px !important;
    }
    }
    

    Best regards,
    Victoria

    #1153323

    Hi Victoria,

    thank you! Now that’s right and it works fine.

    Yours, Thomas

    #1153400

    Hi,

    I’m glad this was resolved. If you need additional help, please let us now here in the forums.

    Best regards,
    Jordan Shannon

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘different margin of elements (responsive)’ is closed to new replies.