Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jamiemarsland/583a33fbec759dd07896b8ba76a5451e to your computer and use it in GitHub Desktop.
Save jamiemarsland/583a33fbec759dd07896b8ba76a5451e to your computer and use it in GitHub Desktop.
Remove negative margins on mobile
@media (max-width: 768px) {
[style*="margin-top:-"] { margin-top: 0 !important }
[style*="margin-right:-"] { margin-right: 0 !important }
[style*="margin-bottom:-"] { margin-bottom: 0 !important }
[style*="margin-left:-"] { margin-left: 0 !important }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment