首页 > 解决方案 > How to remove padding for mobile devices on WordPress

问题描述

I'm new to WordPress and CSS; currently creating a WordPress site and on the last stretch. I need to figure out a way to override the current padding on desktop and laptop sized browsers, as the elements are stuck in the middle with padding on either side on mobile devices.

I've tried to create my own CSS but it's not working (im rubbish) so I'm hoping some experts can help. I tried this below-

@media all and (max-width : 780px) {
.column{
    padding-left:0px;
    padding-right:0px;
}
}

The webpage I'm testing it on is https://www.xordium.co.uk/your-cloud-journey/

Thanks!

标签: csswordpress

解决方案


@media only screen and (max-width: 600px) {
    .vc_custom_1528804063483 {
        padding-left: 20px !important;
    }
}

只需将其放入您的 style.css 文件中,宽度为您设置的宽度,例如我写的 600。

希望这对你有用。


推荐阅读