Raised This Month: $ Target: $400
 0% 

Solved Broken table when supposed to work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-30-2021 , 22:00   Re: Broken table when supposed to work
Reply With Quote #1

The "%-22.22s" will add spaces to the names up to 22 characters (which is why I used 22 characters for each name in my test HTML). This should be changed to "%.22s" so that all names will be truncated to 22 characters if they have more than 22 characters. Change the 22 as needed. Once you fix this, you can remove that replace while loop entirely.

Using "%-22.22s" would be required if you weren't using HTML but instead using just plain text (with a fixed-width font) to create column alignment.
__________________

Last edited by fysiks; 09-30-2021 at 22:02.
fysiks is offline
GasmoN
Member
Join Date: Jul 2014
Old 10-02-2021 , 07:17   Re: Broken table when supposed to work
Reply With Quote #2

Quote:
Originally Posted by fysiks View Post
The "%-22.22s" will add spaces to the names up to 22 characters (which is why I used 22 characters for each name in my test HTML). This should be changed to "%.22s" so that all names will be truncated to 22 characters if they have more than 22 characters. Change the 22 as needed. Once you fix this, you can remove that replace while loop entirely.

Using "%-22.22s" would be required if you weren't using HTML but instead using just plain text (with a fixed-width font) to create column alignment.
Thank you for the advice. I removed the loop.
GasmoN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode