Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hi barrd,

Regarding your css example, I did a quick test with two recent builds of Mozilla (Build 2002091208/WinNT, 2002100104/Linux). A <div class="test_underscore"> was perfectly stylable through css.

Looking some more at the Perlmonks code, I noticed that both th.nodelet_head and tr.nodelet_head are used. Specifying a generic class ".nodelet_head" doesn't work, as it is less specific than the original style specificatuions. Playing with Mozilla's DOM inspector is very helpful to debug CSS issues like this.

My solution is simple (for Mozilla at least): add the "!important" qualifier to your styles, this will override more specific but "unimportant" styles.

.nodelet_head { font-weight: bold !important; color: #ff9933 !important; background-color: #990000 !important; }
This Works For MeTM.

On a side note, there is no mention of "css" connected with "underscore" to be found in Bugzilla - so I don't think this is a bug, at least not with current builds.

Update: Fixed a typo ;-(

Update 2: Apparently, from the CSS level 2 syntax specification I seem to conclude that the underscore in style identifiers indeed is illegal. Still, this works just fine for IE 5.x+ and Netscape 6+ (Mozilla) in production code on the site I'm maintaining as well. Hmm, maybe I should fix that one day...

--
Cheers, Joe


In reply to Re: On CSS and other machinations. by joe++
in thread On CSS and other machinations. by barrd

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 exploiting the Monastery: (3)
    As of 2021-04-19 22:45 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?