JSFiddle - React, Tailwind, and code Playground
by John Doe
HTML
<div id='table_wrapper'><table class=week><colgroup>
<col/>
<col class='mo'/>
<col class='di'/>
<col class='mi'/>
<col class='do'/>
<col class='fr'/>
<col class='sa'/>
<col class='so'/>
</colgroup>
<thead><tr><th class='kw'>KW 01</th><th class='mofr'>Mo, 01.1.2018</th><th class='mofr'>Di, 02.1.2018</th><th class='mofr'>Mi, 03.1.2018</th><th class='mofr'>Do, 04.1.2018</th><th class='mofr'>Fr, 05.1.2018</th><th class='we'>Sa, 06.1.2018</th><th class='we'>So, 07.1.2018</th></tr></thead><tbody><tr><th class='ma'>1</th>
<td id='1_01_01_2018'>
<button data-myID='image_ap_1_01_01_2018_1514761200_2'>xyz</button>
</td>
<td id='1_02_01_2018'>
<button data-myID='image_ap_1_02_01_2018_1514761200_2'>xyz</button>
</td>
<td id='1_03_01_2018'>
<button data-myID='image_ap_1_03_01_2018_1514761200_2'>xyz</button>
</td>
<td id='1_04_01_2018'>
<button data-myID='image_ap_1_04_01_2018_1514761200_2'>xyz</button>
</td>
<td id='1_05_01_2018'>
<button data-myID='image_ap_1_05_01_2018_1514761200_2'>xyz</button>
</td>
<td id='1_06_01_2018'>
<button data-myID='image_ap_1_06_01_2018_1514761200_2'>xyz</button>
</td>
<td id='1_07_01_2018'>
<button data-myID='image_ap_1_07_01_2018_1514761200_2'>xyz</button>
</td></tr><tr><th class='ma'>2</th>
<td id='2_01_01_2018'>
<button data-myID='image_ap_2_01_01_2018_1514761200_2'>xyz</button>
</td>
<td id='2_02_01_2018'>
<button data-myID='image_ap_2_02_01_2018_1514761200_2'>xyz</button>
</td>
<td id='2_03_01_2018'>
<button data-myID='image_ap_2_03_01_2018_1514761200_2'>xyz</button>
</td>
<td id='2_04_01_2018'>
<button data-myID='image_ap_2_04_01_2018_1514761200_2'>xyz</button>
</td>
<td id='2_05_01_2018'>
<button data-myID='image_ap_2_05_01_2018_1514761200_2'>xyz</button>
</td>
<td id='2_06_01_2018'>
<button data-myID='image_ap_2_06_01_2018_1514761200_2'>xyz</button>
</td>
<td...
CSS
body
{
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}
#table_wrapper
{
white-space: nowrap;
flex: 1;
overflow: auto;
}
.week
{
display: inline-table;
border-collapse: separate;
border-spacing: 0;
background-color: white;
color: black;
margin: 2px;
}
.week th,
.week td
{
border: solid #808080;
border-width: 0 thin thin 0;
width: 15vw;
min-height: 70px;
padding: 0px;
text-align: center;
vertical-align: middle;
font-weight: normal;
}
.week thead th
{
border-top-width: thin;
}
.week th:first-child
{
border-left-width: thin;
}
.week td
{
font-size: 1.75em;
position: relative;
}