0

I am creating an unordered list for horizontal tab component. I want each list item filling in one of three boxes with uniform length and height shown on the image. Here is my jsFiddle and javascript. What should I change on CSS to make this happen?

na.cx/i/a7J56X.png

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

Here is the jsfiddle.

arman1991
  • 1,166
  • 1
  • 18
  • 28
Ken Kwok
  • 388
  • 3
  • 19

2 Answers2

1

HTML & CSS: How to create four equal size tabs that fill 100% width?

I tried table display yesterday but did not work yesterday. Yet, it seems to work today so I post it in case someone shares the same problem with me

Community
  • 1
  • 1
Ken Kwok
  • 388
  • 3
  • 19
1

Nice solution.

One of advices and solutions is also to take look on bootstrap components, and just include the classes correctly:

<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
 <body>
<ul class="nav nav-pills nav-justified">
  <li role="" class="active"><a href="#">Home</a></li>
  <li role=""><a href="#">Profile</a></li>
  <li role=""><a href="#">Messages</a></li>
</ul>
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
      </body>
  </html>

I think this can also be helpful, you can save a lot of time with design :)

arman1991
  • 1,166
  • 1
  • 18
  • 28