为什么边距在 'bootstrap col' 的 div 之间不起作用? [英] why margin does not work in between div of 'bootstrap col'?

查看:35
本文介绍了为什么边距在 'bootstrap col' 的 div 之间不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://bootply.com/84073

<header class="clearfix"><section id="branding"><a href="index.php"><img src="https://www.google.com/images/srpr/logo4w.png" alt=""></a></节></header></div>

我尝试添加 #branding{margin: 0 auto} 以将徽标样式设置到中间,但它不起作用

解决方案

您可以使用

 #branding{text-align: center;}

http://bootply.com/84073

<div class"col-lg-12"="">
    <header class="clearfix">
        <section id="branding">
            <a href="index.php"><img src="https://www.google.com/images/srpr/logo4w.png" alt=""></a>
        </section>
  </header></div>

I tried to add #branding{margin: 0 auto} to style the logo to the middle, but it doesn't work

解决方案

You can use

 #branding{text-align: center;}

这篇关于为什么边距在 'bootstrap col' 的 div 之间不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆