Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: getting html characters to align

by tangent (Vicar)
on Mar 07, 2019 at 02:44 UTC ( #1230993=note: print w/replies, xml ) Need Help??

in reply to getting html characters to align

HTML does collapse whitespace, so if you have three spaces they will only display as one space. A common way to deal with that is to replace each space with the HTML entity  . Another way to preserve whitespace is to add white-space: pre; to your .hft-lines CSS definition. The problem with both of these is that each letter is not the same width so the columns will still not line up.

Another way would be to wrap your text in a <pre>..</pre> tag - this will preserve the whitespace and also the column widths, but it does that by using a mono-spaced font (one where each letter is given the same space), but this is usually not that pretty.

I think your best solution would be to use a table, where each letter, and space, is put in a single cell. A bit cumbersome but you will then be able to keep the nice font.

These modules both work with array of array structure:

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1230993]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2022-01-28 20:29 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (73 votes). Check out past polls.