Centering <a> element with an image inside a div
This question already has an answer here:
尝试style="text-align:center"
:
<div class="col-md-6 logo" style="text-align:center">
<a class="navbar-brand" href="/index.html">
<img src="#">
</a>
</div>
put your img a class like
In css
img.example { margin : auto; }
Problem solved, navbar-brand has float:right by default. so i shanged it to :none; and text align: center;
链接地址: http://www.djcxy.com/p/75770.html下一篇: 使用div内的图像居中<a>元素