• This is driving me insane and I’m sure there’s a very simple answer I’m missing. I’ve been searching diligently through the codex and the forums for two days now, argh.

    Here is my category page: http://nandamai.net/fic/?cat=31. The category title and post title are fine. But I want the excerpt to a) be in italics, and b) fall on the next line after the title (i.e., no blank space). I’ve used existing classes, made new classes, tried div, p, span, and pre just in case, declared top and bottom margins and font-style in the style sheet. I even tried creating a new div in place of “post.” I’m pretty sure there’s nothing else in the style sheet controlling this style element.

    My theme (anthurium) doesn’t have category.php so I created it using index.php and some code from Kubrick.

    Here’s the relevant bit of my category.php, so you don’t have to look it up:

    <div class="post">

    <p class="catstory" id="post-<?php the_ID(); ?>">
    " rel="bookmark">
    <?php the_title(); ?>

    <p class="catdescrip">
    <?php the_excerpt(); ?>

    </div>

    And here’s what I’m currently using in the style sheet:

    .catstory {
    font: 16px "Book Antiqua", "Times New Roman", georgia, times, serif;
    color: #c00;
    letter-spacing: .1em;
    margin-top: 15px;
    margin-bottom: 0px;
    padding-bottom: 0px;
    }

    .catdescrip {
    font: 14px "trebuchet ms", verdana, tahoma, futura, helvetica, sans-serif;
    color: #111;
    font-style: italic;
    margin-top: 0px;
    padding-top: 0px;
    }

    Help!

    Thanks lots.

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you use <p>s everywhere – you should check the p{…} portion of your stylesheet. Paragraphs by default have top and bottom margin and all your p’s inherit that.

    Thread Starter nandamai

    (@nandamai)

    Thanks. 🙂 Yeah, I tried it without the s (<span>, etc.), and I even altered my plain old regular p to see what would happen to the category page … and nothing happened. Driving. Me. Crazy.

    Thread Starter nandamai

    (@nandamai)

    I gave in and did a workaround — I created a separate style sheet for the category page, which I really didn’t want to do. It still fussed with me, though; I started over from scratch, and ended up having to take zero out all top and bottom margins everywhere. In the end I had to use <br> in category.php to get it to give me a line after the excerpt. No amount of CSS would do that for me. Weird.

    If anybody else comes along in this thread, I’m still interested in the solution to why I couldn’t get the title and the excerpt right next to each other in the first place. Thanks.

    I even altered my plain old regular p

    That’s what I did in FF with the Web Developer – and it works.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘trouble formatting post metadata in category.php’ is closed to new replies.