philmasterplus
Active member
I've been trying to right-align table cells in the KoLmafia CLI with print_html() but couldn't get it to work properly.
Most of the time, the table cells are simply center-aligned, regardless of the text-align value. When I use print_html() multiple times, previous tables are occasionally re-aligned properly. See:

Code:
print_html('<table style="border-width: 1px;"><tr style="background-color: #CCCCCC;"><th style="border-width: 1px;">Long Column Title</th><th style="border-width: 1px;">Another Long Column Title</th></tr><tr><td style="border-width: 1px;">normal text</td><td style="border-width: 1px; text-align: left;">left-aligned</td></tr><tr><td style="border-width: 1px; text-align: center;">center-aligned</td><td style="border-width: 1px; text-align: right;">right-aligned</td></tr></table>');
Most of the time, the table cells are simply center-aligned, regardless of the text-align value. When I use print_html() multiple times, previous tables are occasionally re-aligned properly. See:
