• I’m trying to format the content of my posts with css and it’s not working. Works fine on other lines, but I get nothing with that one. Here’s the code I’m using to insert posts on my page:

    <?php query_posts(‘category_name=News&showposts=1’); ?>
    <?php while (have_posts()): the_post(); ?>
    <h2><?php the_title(); ?></h2>
    <p style=”color: #ffffff; font-family: tahoma, geneva; font-size: 10pt; margin-left: 30px;”><?php the_content(); ?></p>
    <p style=”color: #ffffff; font-family: tahoma, geneva; font-size: 10pt; margin-left: 20px;”>Posted by <?php the_author(); ?> on <?php the_date(); ?></p>
    <?php endwhile; ?>

    As you can see I’m using the EXACT same <p style line in front of both the_content AND the_author. This works for the author, but the content just comes up default on the page.

    Any thoughts?

Viewing 1 replies (of 1 total)
  • Thread Starter romanonly

    (@romanonly)

    Switched from using a <p> to using a <div> and it solved the problem. If anyone knows how to make <p> work feel free to post.

Viewing 1 replies (of 1 total)
  • The topic ‘Formatting the_content() with CSS’ is closed to new replies.