• Resolved ilione

    (@ilione)


    I’ve been searching the support and churning over the codex for a few days now, and although I have everything pretty much the way I want it, I can’t get past this problem.

    I’m making a site to post stories to and each story has it’s own category. So I created my own archives.php that simply uses wp_list_categories and I removed any categories that aren’t stories, with the &exclude string… Have a peek here So far so good!

    I got rid of the bullets, but now the list entry font needs to be bigger and I just can’t do it!

    I read on here about the fact that wp_list_categories is creating the <li> tags around each category and I’ve been viewing my source to check for weird tags — so this is the code I have so far…

    Firstly in my archives.php:

    <div id="cat_list">
    <ul>
    <?php wp_list_categories("orderby=ID&exclude=2,4&feed=RSS&feed_image=/wp-content/themes/thehobbit/img/rss.png&title_li="); ?>
    </ul>
    </div>

    and then my CSS:

    div#cat_list ul {
    	margin-left: 1.8em;
    	font: normal 2.2em;
    	list-style: none;
    }
    
    div#cat_list li {
    	font: normal 2.2em;
    }
    
    div#cat_list a {
    	font: normal 2.2em;
    }
    
    div#cat_list a:hover {
    	font: normal 2.2em;
    }
    
    div#cat_list a:visited {
    	font: normal 2.2em;
    }

    I know I’m probably missing something really stupid but I’m finding it impossible to see what it is.

    Hope someone can help =)

    x

Viewing 2 replies - 1 through 2 (of 2 total)
  • First you don’t need the div in front of all the cat_list sytles. #cat_list li will work just fine. Next you need to use the font-size style. So your styles would look like this. Plus since all the styles are the same just style the ul tag like this the rest of the styles are unnecessary.

    #cat_list ul {
    	margin-left: 1.8em;
    	font-size: 2.2em;
    	list-style: none;
    }
    Thread Starter ilione

    (@ilione)

    Oh now… that was so simple. No wonder I’ve been tearing my hair out! I’ve even had the CSS with jut #cat_list ul and ended up with all the styles because I couldn’t figure out why it wasn’t working… that pesky font-size!

    Thank you so much jeremy. That’s really made my day =)

    x

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_list_categories <li> <ul> styling problems’ is closed to new replies.