tabs css only

Solutions on MaxInterview for tabs css only by the best coders in the world

showing results for - "tabs css only"
Jonah
22 Jul 2019
1<div class="tab content1">Tab1 Contents</div><div class="tab content2">Tab2 Contents</div><div class="tab content3">Tab3 Contents</div><div class="tab content4">Tab4 Contents</div><div class="tab content5">Tab5 Contents</div>
Mathilda
06 Jan 2021
1.panel {
2  display: none;
3  padding: 20px 30px 30px;
4  background: #fff;
5}
6
7@media (min-width: 600px) {
8  .panel {
9    order: 99;
10  }
11}
12
13.input:checked + .label + .panel {
14  display: block;
15}
Andrea
11 Jan 2019
1.tabs {
2  display: flex;
3  flex-wrap: wrap;
4  max-width: 700px;
5  background: #efefef;
6  box-shadow: 0 48px 80px -32px rgba(0,0,0,0.3);
7}
Jay
14 Sep 2019
1.label {
2  width: 100%;
3  padding: 20px 30px;
4  background: #e5e5e5;
5  cursor: pointer;
6  font-weight: bold;
7  font-size: 18px;
8  color: #7f7f7f;
9  transition: background 0.1s, color 0.1s;
10}
11
12.label:hover {
13  background: #d8d8d8;
14}
15
16.label:active {
17  background: #ccc;
18}
19
20.input:focus + .label {
21  box-shadow: inset 0px 0px 0px 3px #2aa1c0;
22  z-index: 1;
23}
24
25.input:checked + .label {
26  background: #fff;
27  color: #000;
28}
29
30@media (min-width: 600px) {
31  .label {
32    width: auto;
33  }
34}
Debora
11 Mar 2016
1* {
2  box-sizing: border-box;
3}
4
5body {
6  padding: 10px;
7  background: #f2f2f2;
8}
Tucker
14 Feb 2016
1<div class="tabs">
2  <input name="tabs" type="radio" id="tab-1" checked="checked" class="input"/>
3  <label for="tab-1" class="label">Orange</label>
4  <div class="panel">
5    <h1>Orange</h1>
6    <p>The orange (specifically, the sweet orange) is the fruit of the citrus species Citrus × sinensis in the family Rutaceae</p>
7    <p>The fruit of the Citrus × sinensis is considered a sweet orange, whereas the fruit of the Citrus × aurantium is considered a bitter orange. The sweet orange reproduces asexually (apomixis through nucellar embryony); varieties of sweet orange arise through mutations.</p>
8  </div>
9
10  <input name="tabs" type="radio" id="tab-2" class="input"/>
11  <label for="tab-2" class="label">Tangerine</label>
12  <div class="panel">
13    <h1>Tangerine</h1>
14    <p>The tangerine (Citrus tangerina) is an orange-colored citrus fruit that is closely related to, or possibly a type of, mandarin orange (Citrus reticulata).</p>
15    <p>The name was first used for fruit coming from Tangier, Morocco, described as a mandarin variety. Under the Tanaka classification system, Citrus tangerina is considered a separate species.</p>
16  </div>
17
18  <input name="tabs" type="radio" id="tab-3" class="input"/>
19  <label for="tab-3" class="label">Clemantine</label>
20  <div class="panel">
21    <h1>Clemantine</h1>
22    <p>A clementine (Citrus ×clementina) is a hybrid between a mandarin orange and a sweet orange, so named in 1902. The exterior is a deep orange colour with a smooth, glossy appearance. Clementines can be separated into 7 to 14 segments. Similarly to tangerines, they tend to be easy to peel.</p>
23  </div>
24</div>
Angela
29 Apr 2020
1.input {
2  position: absolute;
3  opacity: 0;
4}