Support » Themes and Templates » Trouble with <p> CSS

  • Resolved shnafoo


    I am trying to change the CSS for <p> in the post but it is not responding…

    This is my code (took from Kubrick):
    <h2><?php the_title(); ?></h2>
    <?php the_content(‘<p class=”single”>Read the rest of this entry »</p>’); ?>

    And this is what the browser sees:
    (notice the lack of a p class)
    <h2>(content stuff)</h2>
    <p>(content stuff)</p>

    I’ve been changing the p class single to some pretty outrageous stuff to to try and make it respond, but it still does not…

    this is the site, if you want to see:

Viewing 6 replies - 1 through 6 (of 6 total)
  • Not sure how outrageous you are trying to be but try playing with this p in your CSS…

    p { line-height: 60px;}

    The formatting is not responding if I put it in the p.single class. It only responds if I put it in the whole div CSS, and then it also affects the <h2> tag, etc.

    I’m trying to figure out how to get my p.single class into the CSS for a post. When I look at the browser source, <p class=”single”> is nowhere to be found.


    This bit of code

    <p class="single">Read the rest of this entry ยป

    only has an affect on the actual text within the tag above. Your example does not use this element so it is not showing.

    What are you trying to do with your p tags exactly?

    Thanks James,
    I want to make the font-size and line-height about 130%.

    I’m not sure what CSS the_content() references, so I don’t know how to change it…

    Try this…

    #pagecontent p {font-size: 60px;}

    The 60px is huge so change to whatever you want in regards to %, px or em

    Thanks James, I think I got it. You’re a big help, seriously.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Trouble with <p> CSS’ is closed to new replies.