The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS WordPress Excerpts losing css styling. Please help…

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #33296

    Hi all,

    This is a WordPress/CSS issue.

    I am pulling in excerpts of posts to my homepage. However, the CSS class names that I gave to these aren’t being picked up. What is strange is that the_excerpt for example is adding its own

    tags within mine. So my code (as follows) is:


    ">Read more.

    But the output I get is this (from Firebug):

    Dynamic Post Inside WordPress

    Welcome to WordPress. This is your first post. Edit or delete it, then start blogging! Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident

    Read more.

    …so the actual excerpt is not going inside my

    tag witht he defined class, but within it’s own


    Please help. I’m hoping that I am just missing something obvious?




    I have to ask. Where are you putting this code? Within the actual excerpt?


    Thanks for response.

    The code you are seeing (first section) is the actual code typed into index.php

    The second set of code is what you see in view source when the page is rendered.

    Hope you can help,



    Okay, I’m guessing I need to change the containing element from a p to a div, keep the same class name. That seems to solve my problems. Am I right, or have I just hacked my way out?


    Nope, that’s exactly right.


    Phew, thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.