That did it! Thanks for the great explanation too! Kamil Saiyed Rhapsody Solutions, LLC Application Developer 281 668 9177 Phone 713 595 6699 Fax [email protected] www.rhapsodysolutions.net
-----Original Message----- From: Joergen W. Lang [mailto:[email protected]] Sent: Wednesday, April 21, 2010 3:59 PM To: Kamil Saiyed Subject: Re: [css-d] Problem overriding background-image for li 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.814 / Virus Database: 271.1.1/2823 - Release Date: 04/21/10 01:31:00 ______________________________________________________________________ css-discuss [[email protected]] 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/
