【问题标题】:CSS Padding is not working properly, it's looking as a marginCSS Padding 无法正常工作,它看起来像一个边距
【发布时间】:2021-08-15 15:01:42
【问题描述】:

我正在尝试在 elementor 上使用 css 编写列边距和填充,以便进行媒体查询以适应不同的桌面屏幕。

选择器是在布局的特定元素中使用css的方式

selector{
    margin:0.5em !important;
    padding-top: 110px !important;
    padding-bottom:6em !important;
    padding-left: 3em !important;
    padding-right: 4em !important;
}

When I use padding, it moves down the margin insted of filling the column

在 Elementor 菜单和自定义 CSS 中使用了相同的值

该网站是:

https://fisherdog.com/home/

【问题讨论】:

    标签: css padding margin elementor


    【解决方案1】:

    我可以看到您没有将填充应用于正确的选择器。您应该将其应用于内部 div(您当前放置它的那个的子级)从检查器中,这是具有 calss="elementor-column-wrap elementor-element-populated" 的 div。 我试过了,当我在上面应用填充时,它看起来就像其他卡片一样。

    【讨论】:

    • 非常感谢@Martin,我很难理解你的答案,两个小时后它看起来很棒。非常感谢您的帮助!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-12
    • 2015-07-13
    • 2013-07-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多