开发者

How to have jQuery UI tabs evenly occupy the tabs area without any space following by?

If I use jQuery-UI tabs, it often give me an space on the right of the tabs like following:

How to have jQuery UI tabs evenly occupy the tabs area without any space following by?

You saw above, there is a big space after the three tabs. How to remove the space to have whatever number o开发者_Python百科f tabs to be evenly occupy the tabs area without any space following by?


You can use flexbox and then add a polyfill, here is a jsfiddle:

http://jsfiddle.net/tBwRL/

.ui-tabs .ui-tabs-nav {
  display: -webkit-box;
  display: -moz-box; 
  display: box; 
}


.ui-tabs .ui-tabs-nav li {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
}

.ui-tabs .ui-tabs-nav li:last-child {
  margin-right: -7px;
}

.ui-tabs .ui-tabs-nav li a {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  text-align: center;  
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜