im trying to create something like this google tabs menu with this bar with some radius.
ul {
border-bottom: 1px solid #eee;
}
ul li {
display: inline-block;
text-decoration: none;
}
li {
padding: 10px 0px;
margin: 0 20px;
cursor: pointer;
}
li a.active {
position: relative;
content: "";
display: block;
height: 4px;
width: 100%;
background: #1a73e8;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
<ul>
<li><a href="index.html" class="active">Dashboard</a></li>
<li><a href="mytasks.htm">My tasks</a></li>
</ul>
I tried various types of combinations but failed…
2
Answers
::after
pseudo on the.active
anchorli
elements. Treat them as semantic wrappers.tabs
(yes, use a class for that UL parent)I have tried to solve your problem using some CSS code changes. try it: