I have created a tab and calling a function on click I am facing difficulty to write CSS as per below requirement.
1.active tab should be shown with blue underline color.
2.on click of the tab the blueline should come under the active tab. (it is like similar to angular material tabs) but I don't want to use angular material
Below is the tabs created :
<div class="tab">
<button class="tablinks" (click)="function1()">Tab1</button>
<button class="tablinks" (click)="function2()">Tab2</button>
</div>
Below is the CSS trying:
.tab {
overflow: hidden;
border-bottom: 1px solid #ccc;
background-color: white;
}
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 12px 14px;
transition: 0.3s;
font-size: 17px;
}
.tab button:hover {
background-color: #ddd;
}
.tab button.active {
background-color: blue;
}
.tabcontent {
display: block;
padding: 6px 12px;
border: 1px solid #ccc;
border-top: none;
}
it is great if any one helps, Thanks