WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Trouble with <p> CSS (7 posts)

  1. shnafoo
    Member
    Posted 6 years ago #

    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:
    http://solarone.dreamhosters.com/wordpress/2007/08/14/dot-pledges-350m-to-nyc-for-congestion-pricing/

  2. JamesICT
    Member
    Posted 6 years ago #

    Not sure how outrageous you are trying to be but try playing with this p in your CSS...

    p { line-height: 60px;}

  3. shnafoo
    Member
    Posted 6 years ago #

    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.

    ??

  4. JamesICT
    Member
    Posted 6 years ago #

    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?

  5. shnafoo
    Member
    Posted 6 years ago #

    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...

  6. JamesICT
    Member
    Posted 6 years ago #

    Try this...

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

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

  7. shnafoo
    Member
    Posted 6 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags