|go ahead... be a heretic|
Perlmonks CSS font size hackby xdg (Monsignor)
|on Jul 30, 2004 at 18:40 UTC||Need Help??|
I got tired of squinting at the tiny fonts that were rendering in my browser on Perlmonks and decided to try to fix it with some on-site CSS markup on my User Settings page. This turned out to be harder than I expected, but along the way I discovered an interesting hack that some people might find useful.
Much of the problem with setting font sizes on Perlmonks seems due to the fact that there are FONT elements sprinkled throughout the HTML source that override CSS styles put on elements like <p> and <td>. It's further compounded by the fact that individual posters may or may not post properly formatted HTML.
An interesting hack I found (at least on Firefox and IE6) is that you can apply a CSS style to a FONT element! This allows code like the following
to override the font size settings on markup in the HTML like <tt><font size="-1"> (used for code) and <ul><font size="2"> (used for replies).
Separately (and perhaps this should be a separate PM Discussion post), in searching archives for CSS related nodes, it looks like there hasn't been any discussion since about 2003 on bringing PM up to date with (X)HTML/CSS standards (and eliminating non-CSS styling in the HTML). Currently, PM fails to even validate as proper HTML 4.0 Transitional as given in the DTD. (c.f. Perlmonks W3C Validation.) Maybe it's time to refresh that conversation since presumably, the old Netscape 4 holdouts have moved on to more modern browsers.
Code posted by xdg on PerlMonks is public domain. It has no warranties, express or implied. Posted code may not have been tested. Use at your own risk.