Text in textbox has unwanted spaces. css RRS feed

  • Question

  • User1717218719 posted

    I have text in a text box and it looks like:

    .                                                 --------------------------------------------------                Helllo world               --------------------------------------------------.                                                 xxx                                     15.60 .                                                 yyy

    I would like it to look like:

    .--------------------------------------------------Helllo world--------------------------------------------------.                                                

     xxx 15.60 .


    I have tried to unjustify it and change the letter spacing in css but it does'nt seem to do the trick.

    Any help with this css would be great.

    Friday, April 12, 2019 1:17 PM

All replies

  • User753101303 posted


    Use https://developers.google.com/web/tools/chrome-devtools/inspect-styles/ (F12 Elements in your browse) to inspect your markup and understand why it is rendered this way. 

    It could be that you have some margin around your text elements or maybe you are reading back this text all along with non-breaking spaces from your db ? As always to fix a problem you have first to see why exactly it behaves this way... It seems yalso you should use <br/> or <div/> to render lines one after the other rather than all elements on a single wrapped line.

    If you still need helmp a site such as https://jsfiddle.net/ could be best so that we can see which markup you are using and how it is rendered rather than trying to explain that using ASCII characters...

    Monday, April 15, 2019 11:12 AM