html - Box border for each letter inside span -


i have span below

    <span style="font-size:18px; font-weight:bold;">8342</span> 

how can put black box around each number inside span using css?

i want below image

enter image description here

please check 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> &nbsp;"; $(".test").append(sp); } 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -