There are several ways to accomplish this, and some may work better than others depending on the surrounding content and your current layout model. Here are three ways you could try:
1) Position the <li> elements over the horizontal line
By setting li { position: relative } you can move the list elements around. This allows us to move them 1 pixel downwards, so their bottom border or bottom edge cover the horizontal line. Then you can make the active tab cover the line using either border-bottom, or by setting a background-color.
Example 1 - JSFiddle
li { position: relative; bottom: -1px; display: inline; padding: 10px; } li.current { border: 1px solid #bbb; border-bottom: 1px solid #fff; }
2) Hide the bottom line with a pseudo element
Another way would be to generate a pseudo element (::before or ::after) to hide the horizontal line under the active tab.
Example 2 - JSFiddle
li.current { position: relative; border: 1px solid #bbb; border-bottom: 0; } li.current::after { content: ""; position: absolute; z-index: 10; left: 0; bottom: -2px; width: 100%; border-bottom: 1px solid #fff; }
3) Create the horizontal line using a pseudo element
Instead of setting a border on the ul element, we can set the border on a pseudo element. We can then move the pseudo element, and thus the whole line, upwards behind the list elements. Note: I've set z-index:-1 in the example below. This may interfer with your layout model. If so, increase the value, but make sure you assign a greater z-index to the list items so they will display in front of the pseudo element with the horizontal line)
Example 3 - JSFiddle
ul { position: relative; padding: 10px; margin: 0; } ul::before { content: ""; position: absolute; z-index: -1; left: 0; bottom: 1px; width: 100%; border-bottom: 1px solid #bbb; }