【发布时间】:2015-07-22 15:46:00
【问题描述】:
我需要在我的网页中心修复 3 个<div>s。我尝试使用margin: 0 auto;,但它不起作用,即使使用 Bootstrap 的网格。这很复杂,因为无论我做什么,3 <div>s 都不能完全固定在中间。最多有3个按钮,每个按钮下面都有一个段落。
<section class="contenedor">
<nav>
<ul><div class="contenedor">
<li class="col-md-3"><a href="#"><img src="imagenes/icono-1.png" alt="responsive" class="center-block"></a>
<p class="boton-textT">
RESPONSIVE</p>
<p class="boton-textT">WEB DESIGN</p>
<p class="boton-text col-md-12 ">
We create scalable Internet services.
The architecture of the content and
presentation is adapted to the screen
size and device type. We create
Responsive Web Design.
</p></li>
<li class="boton2 col-md-3"><a href="#"><img src="imagenes/icono-2.png" alt="mobile" class="center-block"></a>
<p class="boton-textT">
MOBILE</p>
<p class="boton-textT">APPLICATIONS
</p>
<p class="boton-text col-md-12">
We design the user interfaces
of mobile applications. We know the
iPhone users' needs as well as Metro
system's requirements. Developers
respect quality and organization
of our work, clients love it.
</p></li>
<li class="boton3 col-md-3"><a href="#"><img src="imagenes/icono-3.png" alt="web" class="center-block"></a>
<p class="boton-textT">
WEB</p>
<p class="boton-textT">APPLICATIONS
</p>
<p class="boton-text col-md-12">
We are building UI for web
applications. We understand both:
the strength of trends
and technology constraints. At the
end of the day the user is still the
most important.
</p></li>
</div>
</ul>
</nav>
</section>
【问题讨论】:
-
如果我理解正确,您希望三个元素以相等的宽度居中在您的页面上。所以将每一个的宽度设置为 33% 并设置为 inline-block
-
谢谢!!我已经解决了,删除了和其他错误。然后我把
标签: html css twitter-bootstrap text center