![]() |
space added to long strings at arbitrary positions
The site is adding spaces to long words and I do not understand the logic behind it. Below are four separate lines of exactly the same length as examples. The space it added by the site when you display the post. Interestingly the position of the space depends on the characters in the string:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA A BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBB 12345678901234567890123456789012345678901234567890123456789012345678901234567890 12345678901 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X |
It appears to be happening after the nth character. The reason it appears different is the font is not monospace. When you change it so that every letter takes up the same width...
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBB 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890 Using that numerical scale, it seems a space is being placed after every 80th character. |
Ah, you are right of course. I thought I had made them the same length but have apparently messed up. :) I'm still not sure if that function is useful since browsers will just break the line anyway if it is too long.
|
Yea browsers will brake the line when needed but it is common place to brake on 80 and it is known point of brake so you can figure that into your text. However for CODE and PHP tags I don't think it should be used.
|
Code and php boxes are fine, but I don't like them since they are not much longer than 80 characters. Maybe I'll change the point of this thread then to request a bigger code box (why not just 100% of window width?).
|
Yes, try resizing your window, you'll notice it will get so small until it reaches that break. The break is so users on smaller resolutions, won't always have to scroll horizontally as much.
|
| All times are GMT -5. The time now is 03:04 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI