bootstrap导航头高度

Mis*_*tev 3 javascript css tabs nav twitter-bootstrap

如何使标签的所有名称的高度相同?在LI高度是相同的,但如果我为A高度:100%没有任何变化.谢谢

simple bootstrap
Run Code Online (Sandbox Code Playgroud)

Tre*_*vor 6

你可以使用javascript

$(document).ready(function(){
   var highest = null;

   $(".nav-tabs a").each(function(){  //find the height of your highest link
       var h = $(this).height();
       if(h > highest){
          highest = $(this).height();  
       }    
    });

   $(".nav-tabs a").height(highest);  //set all your links to that height.
});
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/wW2py/9/

对于CSS你可以做

.nav-tabs a {
   height: 62px;  
}
Run Code Online (Sandbox Code Playgroud)

对于您的示例62px可以工作,但是您需要调整它以使其足够大以适应具有最多文本的选项卡.还要确保在bootstrap css之后应用你的css.

http://jsfiddle.net/p9eFQ/