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
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
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?
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.
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
Hi Victoria,
thank you! Now that’s right and it works fine.
Yours, Thomas
Hi,
I’m glad this was resolved. If you need additional help, please let us now here in the forums.
Best regards,
Jordan Shannon