html - Bootstrap li a padding 0 not working -
i'm trying set padding
0 px hyperlink inside li
tag not working. if set in inline specific hyperlink working fine.
html
<div class="container"> <div class="row"> <div class="col-xs-2"> <ul class="nav nav-pills nav-stacked "> <li class="active"><a href="nokia-phones-1.php">nokia</a></li> <li><a href="samsung-phones-9.php">samsung</a></li> <li><a href="motorola-phones-4.php">motorola</a></li> <li><a href="sony-phones-7.php">sony</a></li> </ul> </div> <div class="col-xs-10"> <h2>most viewed</h2> </div> </div> </div>
css
@import url("http://netdna.bootstrapcdn.com/bootswatch/3.1.1/cerulean/bootstrap.min.css"); @import url("http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"); li { padding: 0px; }
i tried
ul li { padding: 0px;}
and
li { padding: 0px;}
and
a { padding: 0px;}
but still not working.
how can set padding
0px hyperlinks inside unordered list
.
you need override class of bootsrap, add css rule:
.nav > li > { padding: 10px 0; }
in bootstrap rule's value 10px 15px, should fix it.
hope helps.
Comments
Post a Comment