Struggling with the HTML code that defines a table? Here is an example:
<table>
<th>
<td style="width:200px">
col1
</td>
</th>
<tr>
<td id="a1">
text1
</td>
</tr>
</table>
Want to add a rectangle next to "text1" within cell #a1, using CSS only? Ensure it has a custom width (e.g. 40px) and is positioned at a fixed offset (e.g. 100px) from the left side of the cell. The final result should look like this:
text1 XXXX
(XXXX represents the filled rectangle)
Keep in mind that you cannot modify the existing HTML or use JavaScript.
The goal is for the CSS to not affect the text's appearance or positioning.
Is achieving this design possible with just CSS?