Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) 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

tt font { font-size: 10pt; } ul font { font-size: 10pt; }

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.

-xdg

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.


In reply to Perlmonks CSS font size hack by xdg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (3)
    As of 2020-06-02 06:33 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you really want to know if there is extraterrestrial life?



      Results (13 votes). Check out past polls.

      Notices?