WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] First paragraph formatting is different from subsequent paragraphs (9 posts)

  1. Scott_Stark
    Member
    Posted 8 months ago #

    Part of my new job is maintaining the website and I'll admit to being a little lost. If anyone can help troubleshoot a very specific problem, I'd be very grateful!

    http://www.appleseednetwork.org/making-pro-bono-count/

    You'll see that the the line spacing in the first paragraph is significantly tighter than the subsequent paragraphs. This problem crops up on all my newsletter posts so I'm sure there's some global setting affecting it. Something to do with CSS? (Told you I was lost...)

    Thanks in advance!

    -Scott-

  2. LapanWebsite
    Member
    Posted 8 months ago #

    Hi, Scott_Stark.

    Your first part of the text is not inside the <p> tags, and so the css is not correct.

    This means you will have to go and edit every single of your posts.
    But, I have better solution for you.

    You can change body tag css.

    Lets see, you have:

    body {
    font-family: Arial, Verdana, Georgia, Lucida, Helvetica, Tahoma, sans-serif, "Myriad Pro";
    font-size: 12px;
    text-align: left;
    background: url(images/body-bg.gif) no-repeat center top #c7c9cd;
    margin: 0;
    }

    Changing it to:

    body {
    font-family: Arial, Verdana, Georgia, Lucida, Helvetica, Tahoma, sans-serif, "Myriad Pro";
    font-size: 12px;
    text-align: left;
    background: url(images/body-bg.gif) no-repeat center top #c7c9cd;
    margin: 0;
    font: 13px/18px Arial;
    color: #000;
    }

    should solve your line height problem.

  3. Dave Naylor
    Member
    Posted 8 months ago #

    That first paragraph, unlike all the others in that big old table, isn't wrapped in <p>...</p> tags, it's just sat inside the table cell. It's therefore not having this css applied to it:

    .page .pageContent p {
    font: 13px/18px Arial;
    color: #000;
    }

    A quick fix would be to add the needed <p> tags. Personally, I'd be looking to use an alternative way to display the newsletter content on the site. It currently looks like it's designed for email.

    Beaten to it above

  4. Scott_Stark
    Member
    Posted 8 months ago #

    @LapanWebsite: That did it! Thank you!

    I am a complete noob (obviously) when it comes to speaking CSS, but if I understand the framework of the problem correctly: I have CSS coding that defines the look of each section of each page; since the first paragraph of my newsletter posts weren't within the <p> tags, it didn't get the correct formatting applied to it.

    Your fix simply redefined the look of the overall body text so that regardless of where that paragraph resided, it would take the formatting of the body.

    Er, right?

    What I'm unclear on is that your fix seems to define only the font size and color; how does that affect the line spacing?

  5. Scott_Stark
    Member
    Posted 8 months ago #

    @WPRanger: You're exactly right in that the coding originally came from an email newsletter; the idea was that the website newsletters should have the same look and feel as those that are emailed and the same coding has just been C&P'd for years.

    I realize you can't recode our whole site, but if you have any broad suggestions for "an alternative way to display the newsletter content on the site," I'd welcome the input.

  6. Dave Naylor
    Member
    Posted 8 months ago #

    Well, why not create the content on your site and then use a mailing list tool to send the exact same copy out to your subscribers. Take a look at something like:

    http://wordpress.org/plugins/wysija-newsletters/

  7. LapanWebsite
    Member
    Posted 8 months ago #

    What I'm unclear on is that your fix seems to define only the font size and color; how does that affect the line spacing?

    font: 13px/18px Arial;

    13px = font-size
    18px = line-height
    Arial = font-family

  8. Scott_Stark
    Member
    Posted 8 months ago #

    @LapanWebsite: Oh fercryingoutloud. Thank you.

  9. Scott_Stark
    Member
    Posted 8 months ago #

    @WPRanger: Thanks. I'll look into that.

Reply

You must log in to post.

About this Topic