Support » Themes and Templates » Extra CSS code is coming from somewhere?

  • I am trying to implement a tree diagram like the one in this tutorial. I pasted the CSS code from the tutorial at the bottom of my theme’s style.css file. It works in that it makes a tree. The problem is that the alignment is off; on my site it looks like this screenshot. Here’s the boggling part: When I paste the entire text of the modified style.css and the HTML document into files on my own computer (linking the two files of course), the tree shows up correctly, exactly as in the tutorial. I assume that some stray CSS code is coming from somewhere and causing the alignment error, but I don’t know from where.

    My theme is Aggregate. In addition to style.css it has four other tiny CSS files, but they do nothing except change the colors of things, and in the theme settings, they are inactive.

    Any ideas?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try using Firefox with the Firebug add-on for this kind of CSS troubleshooting. Or use whatever developer tool is available in your web browser.

    Yes to the above, beyond that, without a link to a page with a live example of this, no way to help with it.

    OK, I didn’t post a link because I didn’t know how to make the page public without a link showing up on my homepage, but I found a way. It’s here. For some reason it’s a little more spaced out now, but still misaligned.

    A general question is: Where might extra CSS code be coming from?

    Without a link to a page demonstrating the problem, we cannot help.

    If you use Firebug, you will immediately see all the CSS affecting that element – for example, it shows this (from the theme’s style.css file:

    .post ul li ul, .post ul li ol, .comment-content ul li ul, .comment-content ul li ol {
        padding: 2px 0 2px 20px;

    OK, Firebug is very helpful. Apparently my site has lots of CSS code that’s not from style.css. Is it normal for the theme’s PHP files to generate additional CSS code?

    I’ll have to do some research about how cascading works in order to solve this. Thanks for your help!

    theme’s PHP files to generate additional CSS code?

    No, but it’s not unusual for a theme to have more than one stylesheet. Plugins can add styles as well.

    Yes, learning basic CSS will be helpful – this is a good reference site:

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Extra CSS code is coming from somewhere?’ is closed to new replies.