Am 21.04.10 20:22, schrieb Kamil Saiyed:
 > Hello everyone:

 > I trying to override background-image in this:

(code slightly condensed for legibility)

 > #container ul li, #content .module ul li{
 >
 >     background:url(../images/marker_liink.gif) 0 5px no-repeat;
 >     /*This needs to be overridden*/
 >
 >     color:#6D5F52;
 >     line-height:16px;
 >     padding:4px 0 5px 25px;
 > }

[...]

 > #tweet ul li{
 >
 >     margin-bottom:8px;
 >     list-style-type:none;
 >     list-style-image:none;
 >
 >     background-image: none;
 >     /*This is what I am trying to accomplish*/
 >
 >    line-height:1.4em;
 >    padding:2px 5px;
 >    border:1px solid #fff;
 > }

Quickly checked with Firebug (FF addon). If you replace

    #tweet ul li

with

    #content #tweet ul li

you should get what you want.

Explanation: The selector '#content .module ul li' (part of #container 
ul li, #content .module ul li) is more *specific* than the following 
rule. Despite its 'lower' position in the CSS source it gets overriden 
by the first rule (i.e. the definition for 'background').

Thus, by adding '#content' to the second rule, you can make it more 
specific than the first one.

hope this helps,

Joergen

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to