[英]how do I center align a content element with wordpress custom css?
I am attempting to center align an image carousel in a wordpress webpage. 我正在尝试在wordpress网页中居中对齐图片轮播。 I tried this line of code in Custom CSS from the panel menu and it did not work for me:
我在面板菜单的“自定义CSS”中尝试了这一行代码,但对我不起作用:
.cleaning_carousel {width: 50% !important; .cleaning_carousel {width:50%!important; margin: 0px auto !important;}
保证金:0px auto!important;}
To see the site in question, visit https://livingwatersict.com/ponds/ 要查看有问题的网站,请访问https://livingwatersict.com/ponds/
Can someone point out the mistakes that I am making? 有人可以指出我犯的错误吗?
you can try something like this make an outer div and use css text-align:center
你可以尝试这样的事情做一个外部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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.