Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design easy way to get width (no length) of text inside tage

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #266346
    sobhan konari
    Participant

    hi ,guys

    I have a span tag that a line is bottom of it , I want to get width of each character .

    then for example I want width of line be the same of 2 character of word.

    I want type my word in Persia than in it the character width not equal to itself . thanks

    https://www.imageupload.co.uk/images/2018/02/07/IMG_20180207_192506.jpg

    span{
            margin:0 auto;
            font-size:40px;
            display: inline-block;
            position: relative;
        }
    
    span:after{
        position: absolute;
            content: "";
            border:1px solid #f30;
            left:0;
            top:55px;
            width:45px;
    }
    
Viewing 1 post (of 1 total)
  • The forum ‘Design’ is closed to new topics and replies.