I have a pretty simple div that I created using CSS
.text { text-transform: capitalize; color: #FFFFFF; background: #918a8a; opacity: 0.6; font-size: 2em; height: 80px; width: 200px; }
It basically makes a gray window with some white text with a size of 200 pixels by 80 pixels.
What I would like to do is if the text exceeds 200px and wraps on the next line, a few transparent spaces are added.
So for example, if I have the following HTML:
<div class="text">Here is some text that I typed</div>
I would get the following:

If the background has a different color (blue in this example), the βspaceβ will be transparent and let the blue pass. The background color is based on what the user selects. It can also be a picture, so I canβt precisely control what it will be.

Suppose the text is larger than 200px and that it automatically wraps. There are no two separate div tags. I also do not control the length of the text - it can be from 0 to 60 characters.
Allan source share