I have a span like below
<span style="font-size:18px; font-weight:bold;">8342</span>
How can I put a black box around each number inside that span using css?
I want it just like below image

Please check this Demo
<span style="font-size:18px; font-weight:bold;" class="test">8342</span>
.pwn{
border: 2px solid black ;
display: inline;
}
var text= $(".test").html();
$(".test").html('');
for(i=0;i<=text.length-1; i++)
{
var html = text.substr(i,1);
var sp="<span style='font-size:18px; font-weight:bold;' class='pwn'>" + html
sp+=" </span> ";
$(".test").append(sp);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With