[英]I can't align center a content by using CSS
I can't align center the two block between div class="wrapper-home" 我无法将div class =“ wrapper-home”之间的两个块居中对齐
The site is: www.mattialab.it/wp/ 该站点是: www.mattialab.it/wp/
I just already try by using in body:
text-align: center
or margin: 0 auto;
我刚刚已经尝试通过在
body:
使用body:
text-align: center
或margin: 0 auto;
without any result. 没有任何结果。 Can anyone tell me where I'm wrong or what is missing?
谁能告诉我哪里错了或缺少什么? Thanks!
谢谢!
Just add a width to your container div so the margin's know where to start and stop the centering. 只需在您的容器div中添加一个宽度,以便页边距知道在哪里开始和停止居中。
CSS CSS
.wrapper-header{
margin: 0 auto;
width:900px;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.