I'm doing a TAB component in HTML + CSS, and I have a question regarding css, the code I have is:
@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,700");
.tabs {
font-family: "Open Sans", sans-serif;
width: 222px;
border: 1px solid #E6E6E6;
border-radius: 3px; }
.tabs__tab-list {
list-style: none;
height: 40px;
padding: 0;
margin: -1px;
font-size: 14px;
font-weight: 700;
background-color: #F2F2F2;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-top: 1px solid #E6E6E6;
border-right: 1px solid #E6E6E6;
border-left: 1px solid #E6E6E6; }
.tabs__tab {
display: inline;
padding: 0;
margin: 0;
border: 0; }
.tabs__tab:first-child {
float: left;
width: 46%;
height: 40px;
padding-left: 15px;
display: table;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-right: 1px solid #E6E6E6;
background-color: #FFFFFF; }
.tabs__tab:last-child {
float: right;
width: 54%;
height: 40px;
text-align: right;
display: table;
padding-right: 15px;
border-bottom: 1px solid #E6E6E6;
border-bottom-left-radius: 3px; }
.tabs__tab--selected {
color: pink; }
.tabs__tab__text {
display: table-cell;
vertical-align: middle; }
.tabs__content {
clear: both;
padding: 10px; }
<div class="tabs">
<ul class="tabs__tab-list">
<li class="tabs__tab">
<span class="tabs__tab__text">Tab1</span>
</li>
<li class="tabs__tab">
<span class="tabs__tab__text">
Tab2
</span>
</li>
</ul>
<div class="tabs__content">
<h1>Tab2</h1>
</div>
</div>
How can I prepare this component to take n separators, and show the borders correctly? Any examples / tips that advise me? Thanks