Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-24 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found