Loers Loers - 3 months ago 5x
CSS Question

Convert line to specific keyboard character

I have this code

<td width="100%" bgcolor="#96002D" height="3" style="font-size: 1px; line-height: 1px;">&nbsp;</td>

It's just a line, but I want to replace line for "/" character so I get something like:


How can I do that?

I try these:

<td align="center">////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</td>

But I think it can be more useful like that


There's no way to do exactly what you want but here are 3 alternatives that might help you.

1. Will look different to how you want, but the simplest option

border: 3px solid dashed; in the <td>.

2. What you are after but a bit of a hack

set the <td> to overflow: hidden; and within it add a <p style="white-space:nowrap;>///</p> (with enough '/'s that it will always exceed the width of the <td>.

3. Also close to what you are after, but you will need to create a .png image of the '/' character

add a background-image of the '/' character as a .png for the <td> and set background-repeat: repeat-y;.