• I am hoping someone can help me figure out what’s wrong with my CSS, because I’ve been trying to fix this for a couple hours now and can’t find it myself.

    You will have to log in as username: guest and password: guest to view the site and source info, because it’s not live, yet.

    The problem is here: http://theallstate.webfactional.com/

    Wherever a plain <h2> tag appears, the background is a pale red, and I don’t know why. I must have accidentally done something to make it this way, because it wasn’t like this when I started. But I cannot figure out what.

    You can see what I am talking about here: http://theallstate.webfactional.com/about/

    It’s also happening in the RSS feed part of the sidebar — click ‘Subscribe’ and the ‘Stay up to date’ is backgrounded.

    If someone has a guess or a suggestion, please let me know. I am willing to give someone admin info to try and get this fixed as well.

Viewing 7 replies - 1 through 7 (of 7 total)
  • It’s in your default.css

    #archivebox {
    background-color:#F5CCCC;
    border:1px solid #E06666;
    }
    Thread Starter lfinocchio

    (@lfinocchio)

    Thank you. I never would have found that!

    Try Firefox with the Firebug plugin. It’s a great tool for web development.

    Peter

    Thread Starter lfinocchio

    (@lfinocchio)

    I will try that plugin, thanks!

    I am still having problems, though:

    I don’t have a file called default.css in my theme editor, so I can’t make any changes to that. The default.css is my theme’s color scheme.

    However, in style.css, which is what I have been making significant changes to, I have this:

    #archivebox {
    margin-bottom:15px;
    padding:10px;
    color:#000 !important;

    I’m confused about why all of the changes I have been making to style.css have been overriding the default.css file (at least I assume they have, because my changes are taking effect), except for this?

    Thread Starter lfinocchio

    (@lfinocchio)

    Sorry, that should be

    #archivebox {
    margin-bottom:15px;
    padding:10px;
    color:#000 !important;
    }

    The close bracket is there, I missed it in my C&P.

    I’m confused about why all of the changes I have been making to style.css have been overriding the default.css file (at least I assume they have, because my changes are taking effect), except for this?

    How/if a change is implemented depends upon 2 factors:

    1. The cascade order
    2. The specificity

    In your theme, style.css is called first followed by default.css. So, generally speaking, the declarations in default.css will override those in style.css (the cascade order).

    However, if a given declaration in style.css is more specific – eg:

    .sidebar ul li ul li {list-style-image:url(images/bullet2.jpg);}

    it will override the more general one in the later stylesheet, default.css – eg:

    .sidebar ul li {list-style-image:url(images/bullet1.jpg);}

    In the second level of a nested unordered list, you’ll always see bullet2.jpg – no matter that you image you try to add in default.css

    In this case, however, the background color is in default.css as pboosten pointed out. Line 67 according to Firebug. So you have to make the change to this file. Changes to style.css simply won’t work here.

    Thread Starter lfinocchio

    (@lfinocchio)

    Interesting. Well, I don’t have FTP access to the files on the server for this website yet, so I really can’t touch default.css yet. I should have that capability by the end of this week, so I will play with this more later.

    Thanks to both of you.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Trouble with h2 backgrounds in CSS’ is closed to new replies.