【问题标题】:how do I center align a content element with wordpress custom css?如何将内容元素与 wordpress 自定义 css 居中对齐?
【发布时间】:2018-04-28 13:18:18
【问题描述】:

我正在尝试在 wordpress 网页中居中对齐图像轮播。我在面板菜单的自定义 CSS 中尝试了这行代码,但它对我不起作用:

.cleaning_carousel {宽度:50% !important;边距:0px auto !important;}

要查看相关网站,请访问https://livingwatersict.com/ponds/

谁能指出我犯的错误?

【问题讨论】:

    标签: html css wordpress


    【解决方案1】:

    您可以尝试这样的方法制作一个外部 div 并使用 css text-align:center

    .outer
    {
    text-align:center;
    }
    .inner
    {
    width:300px;
    height:auto;
    }
    <div class="outer">
    
    <img src="http://www.team-bhp.com/forum/attachments/travelogues/412228d1282577980-taj-mahal-full-moon-fatehpur-sikri-mathura-bharatpur-keoladeo-national-park-img_9119_20_21_tonemappedb.jpg" class="inner">
    
    </div>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-01
      • 1970-01-01
      • 2015-06-07
      • 2016-12-26
      • 2021-02-28
      • 1970-01-01
      相关资源
      最近更新 更多