• Resolved SgrWd

    (@adamf24)


    Hello,

    I am having a little bit of trouble when I use the php wp_list_cats function. For some reason, the last child category has a large blank space between it and the next parent category. You can see this in my site on the right-hand sidebar:

    https://www.theinvestorsjournal.com

    I can’t seem to figure out what is causing this large blank space, and I would appreciate some help. I assume it’s somewhere in the CSS, but I don’t know what to look for.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter SgrWd

    (@adamf24)

    Ah my apologies I quickly found the answer by just reading the CSS code carefully.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    If by “large space” you mean 6 pixels or so, then yeah, I see it.

    This is doing it:

    #sidebar ul li {
    ...
            padding:0 0 2px 12px;
    }

    The category list is a set of nested unordered lists. That’s how the child cats are indented further to the right each time. In your case, you have three levels there:

    *  All Investing Articles (20)
              o Stock Market (20)
                    + Beginner Articles (7)
                    + General Articles (9)
                    + History Articles (1)
                    + Investing Psychology (5)
        * Investing Journal (4)
        * Miscellaneous (5)
        * Product Reviews (2)

    Because of the fact that three different LI’s all end right after “investing psychology”, the 2px padding at the bottom of each of those adds up to 6px. Change the 2px to 0px instead to bring them closer together.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Small CSS (It Seems) Problem’ is closed to new replies.