Template:TemplateStyles sandbox/Nardog/Tab demo.css

.tabdemo { display: flex; flex-wrap: wrap; }

.tabdemo label { order: -1; margin: 0 6px 6px 2px; cursor: pointer; }

.tabdemo input { position: absolute; z-index: -1; opacity: 0; }

.tabdemo input ~ span { font-weight: bold; padding: 2px 4px; }

.tabdemo input:checked ~ span { outline: 2px solid lightblue; }

.tabdemo > div { width: 100%; padding: .5em; border: 1px solid #ccc; }