I need to display up to 5 characters of the contents of each table cell at a specific resolution. I do not know if there is any Pseudo Elemento
that does what I need, something like:
Example:
@media (max-width: 548px) {
p:only-five-letters {
content: IMPRIME;
}
}
Output example:
IMPRI
As per Snippet
below, is there any way to do this in CSS, or any script that does this?
<!DOCTYPE html>
<html>
<head>
<style>
table tr td {
border: 1px solid #000;
}
</style>
</head>
<body>
<strong>Como está:</strong>
<table>
<tr>
<td> OSe </td>
<td> Status </td>
<td> Garantia </td>
</tr>
<tr>
<td> 75553 </td>
<td> Expedido </td>
<td> Aprovada </td>
</tr>
<tr>
<td> 75552 </td>
<td> Cancelado </td>
<td> Não </td>
</tr>
<tr>
<td> 75551 </td>
<td> Analise </td>
<td> Não </td>
</tr>
</table>
<br>
<strong>Como eu preciso:</strong>
<table>
<tr>
<td> OSe </td>
<td> Statu </td>
<td> Garan </td>
</tr>
<tr>
<td> 75553 </td>
<td> Exped </td>
<td> Aprov </td>
</tr>
<tr>
<td> 75552 </td>
<td> Cance </td>
<td> Não </td>
</tr>
<tr>
<td> 75551 </td>
<td> Anali </td>
<td> Não </td>
</tr>
</table>
</body>
</html>