As a newcomer to both programming and this website, I've been exploring various codes for creating vertical and horizontal tabs. I have a specific query about this particular example found at https://jsfiddle.net/eu81273/812ehkyf/:
My goal is to adjust the width of the tabs so that they span the entire width of the content block below them. However, my attempts to achieve this by adding 'width: 200px;' in the '.tab' or '.tab label' sections have been unsuccessful. What changes should I make to achieve this desired layout?
.tabs {
position: relative;
min-height: 200px; /* This part sucks */
clear: both;
margin: 35px 0 25px;
background: white;
}
.tab {
float: left;
}
.tab label {
background: #eee;
padding: 10px;
border: 1px solid #ccc;
margin-left: -1px;
position: relative;
left: 1px;
top: -29px;
-webkit-transition: background-color .17s linear;
}
I would greatly appreciate a detailed explanation of what changes need to be made in order for me to fully grasp the solution. Although I have managed to find a method using JavaScript, I am curious whether achieving the same result using only CSS and HTML is possible.