in reply to Re: Hard-coded colors breaking custom CSS settings.
in thread Hard-coded colors breaking custom CSS settings.

Well, here's one where the colors don't seem to be hardcoded, but I'm not seeing the words anyhow:

<tr class="titlebar"> <td class="titlebar"> <form method="get" action="?" enctype="application/x-www-form-urlencoded" > <img src="./images/clearpixel.gif" width="5" height="1" alt="" class="spacer" /> <input type="text" name="node" size="20" maxlength="80" /> <input class="titlebar" type="submit" value="Search" name="go_button" /> </form> </td> <td class="titlebar" id="mb2001titlebar" align="right" > <a class="titlebar" href="?" > Perl&nbsp;Monks </a> </td> </tr>

And my CSS:

tr.titlebar , tr.monkquip { color : #0000aa; background-color : #ffffff; }

The funny think is, the monkquip displays properly, but the titlebar does not.

Replies are listed 'Best First'.
Re^3: Hard-coded colors breaking custom CSS settings.
by Aristotle (Chancellor) on Nov 06, 2005 at 16:22 UTC

    Try either less or more specifity. Either just .titlebar, so all elements with the class are addressed directly (instead of having to inherit their colours from the <tr>), or add a couple more specific ones like td.titlebar, input.titlebar.

    Specificity is a pretty important concept in CSS, and if you don’t understand it, then the cascading and inheritance of things will occasionally snare you in baffling ways.

    Makeshifts last the longest.