UPDATE
Added ellipsis to the cell with red text. Click it to read more and click it again to retract back.
For the retracting ellipsis I used 2 :target
s.
Scrollable, I missed that the first read, ok that's more realistic. Designed for four columns, it would be ridiculous to expect a multitude of columns given the constraints. If I have more time I'll add ellipsis, but for now, just small shrinking font will have to do. Scrolling horizontal cells are done by using overflow:scroll/auto
on the <td>
and append a <div>
inside each <td>
Relevant CSS
table {
width: 98vw;
height: auto;
min-height: 200px;
table-layout: fixed;
}
th,
td {
font-size: .4em;
max-width:19%;
overflow-y:hidden;
overflow-x:scroll;
}
SNIPPET
table {
border-collapse: collapse;
width: 96vw;
height: auto;
min-height: 200px;
table-layout: fixed;
border: 1px solid #ccc;
}
th,
td {
border: 1px solid #ccc;
white-space: nowrap;
font-size: .4em;
min-width: 19%;
}
td {
overflow-x: scroll;
overflow-y: hidden;
}
td div {
min-height: 30px;
}
.ell {
display: block;
position: relative;
outline: 0;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
vertical-align: middle;
width: 100%;
color: red;
}
.ell::after {
content: '&#hellip;';
color: transparent;
padding: 5px 0 5px 5px;
}
#ex1:target {
min-width: 250ch;
transition: all 1s;
text-overflow: visible;
overflow-x: visible;
position: relative;
z-index: 1;
display: block;
border-bottom: 0 none transparent;
}
a {
display: block;
height: 10px;
width: 100%;
}
.in {
display: none;
}
#ex1:target .ex {
display: none;
}
#ex1:target .in {
display: block;
height: 30px;
}
<table>
<thead>
<th>First First First</th>
<th>Second Second Second</th>
<th>Third Third Third</th>
<th>Fourth Fourth Fourth</th>
</thead>
<tbody>
<tr>
<td>
<div>First First First</div>
</td>
<td>
<div>Second Second Second</div>
</td>
<td>
<div>START Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third
Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third
Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third
Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third
Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third Third
Third Third Third Third Third Third Third Third Third Third Third Third END</div>
</td>
<td>
<div>Fourth Fourth Fourth</div>
</td>
</tr>
<tr>
<td>
<div>First First First</div>
</td>
<td>
<div>START Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second
Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second
Second Second Second Second Second Second END</div>
</td>
<td>
<div>Third Third Third</div>
</td>
<td>
<div>Fourth Fourth Fourth</div>
</td>
</tr>
<tr>
<td>
<div>First First First</div>
</td>
<td id='ex1'>
<div class='ell'>
<a href='#ex1' class='ex'></a>
<a href='#in1' class='in'></a>
Second Second SecondSecond Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second Second
</div>
</td>
<td>
<div>Third Third Third</div>
</td>
<td>
<div>
<p>Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth Fourth</p>
</div>
</td>
</tr>
</tbody>
</table>