I am working on a project including a table with scrollable cells. This may not look like the most elegant way to use a table, but this is what works for my use case. Unfortunately, I the top portion of my cell content remains hidden, I cannot scroll to it...
Here's a very small sample from the project (a single cell of a much larger table):
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<table>
<tr>
<th>
<div>
SAMPLE CONTENT1. SAMPLE CONTENT2. SAMPLE CONTENT3. SAMPLE CONTENT4. SAMPLE CONTENT5.
SAMPLE CONTENT6. SAMPLE CONTENT7. SAMPLE CONTENT8. SAMPLE CONTENT9. SAMPLE CONTENT10.
</div>
</th>
</tr>
</table>
</body>
</html>
CSS
th{
border: black 5px solid;
}
th div{
display: flex;
justify-content: center;
align-items: center;
overflow-y: auto;
padding: 5px;
width: 125px;
height: 125px;
}
Why can't I see the top few lines of my scrollable text?