如何制作长度统一的列表项?

时间:2015-06-25 09:40:18

标签: html css tabs grid

我正在为水平标签组件创建一个无序列表。我希望每个列表项填充三个框中的一个,图像上显示的长度和高度均匀。这是我的jsFiddle和javascript。我应该在CSS上做些什么来改变这种情况呢?

$(function(){
    $('#tabs').tabs({
        event: "mouseover"
    });
});

https://jsfiddle.net/m1xhc4v5/6/

1 个答案:

答案 0 :(得分:0)

Add these three values to your css:

 #tabs li{
    display: inline-block;
    text-align: center;
    width: 30%;
}

You need to make an element inline-block for it to receive a width. I used 30% to allow for the borders, you can fine-tune this to what ever value you like.

JSFiddle