Changing Comment Colors in Freshy

  • Unknown's avatar

    Kitten,

    Unfortunately, the “#content .commentlist dd.author_comment {}” declaration cannot be overridden by yours and this is why:

    The author’s declaration reads like this:

    html > body #content .commentlist dd.author_comment {
    	background:url(images/transp-80.png) #c9e45a !important;
    	width:auto;
    }
    
    #content .commentlist dd.author_comment {
    	background-color:#c9e45a !important;
    	filter:alpha(opacity=20);
    	width:510px;
    }

    Notice the “!important” rule there? that makes it take precedence over your element’s declaration because, the structure (the order in which the CSS declarations are being sent to the browser) looks something like this:

    /****** AUTHOR'S DECLARATION **************/
    html > body #content .commentlist dd.author_comment {
    	background:url(images/transp-80.png) #c9e45a !important;
    	width:auto;
    }
    
    #content .commentlist dd.author_comment {
    	background-color:#c9e45a !important;
    	filter:alpha(opacity=20);
    	width:510px;
    }
    
    .........
    [more code]
    .........
    
    /*********** KITTEN'S DECLARATIONS **********/
    
    #content .commentlist dd.author_comment {
    		background-color: #f00 !important;
    }
    
    .........
    [more code]
    .........

    Since the wp software places YOUR code at the end of the CSS, it doesn’t matter if you’re adding the !important rule to your declarations , the author’s will take precedence because appears above yours.

    Please read !important rules for more information.

    This doesn’t work even if you’d use the “start from scratch” option, because the wp software is embedding the author’s declarations by default.

    The only way to make this work, would be by removing the author’s definitions, but I don’t see that happening, the guys at wp.com won’t do it for sure because that could affect other members using the same theme.

    I’m sorry I couldn’t be of more help.

  • Unknown's avatar

    No problem at all. Thank you for taking the time to find this all out and explain it to me. I appreciate it. :-) Marking this one as resolved.

  • The topic ‘Changing Comment Colors in Freshy’ is closed to new replies.