Bootstrap导航高度

时间:2015-03-08 16:33:34

标签: html css twitter-bootstrap

我想在我的网站上使用nav-pills类实现导航,但是当我使用下面的代码时,导航中的按钮太大了。我想改变它的高度。任何解决方案?

<div class="row">
        <div class="box">
            <div class="col-sm-12 text-center">
                <ul class="nav nav-pills">
                    <li role="presentation" class="active"><a href="#">Rekonstrukce</a></li>
                    <li role="presentation"><a href="#">Zemní práce</a></li>
                    <li role="presentation"><a href="#">Rodinné domy</a></li>
                </ul>
            </div>

            <div class="col-sm-4 text-center">
                <a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox"> 
                  <img class="img-responsive" src="img/rekonstrukce/pic1.jpg" alt=""> 
                </a>                  
            </div>
            <div class="col-sm-4 text-center">
                <img class="img-responsive" src="http://placehold.it/750x450" alt="">
            </div>
            <div class="col-sm-4 text-center">
                <img class="img-responsive" src="http://placehold.it/750x450" alt="">
            </div>
            <div class="clearfix"></div>
        </div>
    </div>

1 个答案:

答案 0 :(得分:1)

在你的css中添加:

.nav>li>a {
    padding: 4px 6px !important;
}

(根据您需要的尺寸调整填充值)