ThemeShaper Forums » Thematic

[closed]

Limit Blockquote Images to Outermost Examples

(3 posts)
  • Started 14 years ago by Mischif
  • Latest reply from Mischif
  • This topic is resolved
  1. I want my child theme to display an image when someone puts something in blockquotes, but I want the image to only show up on the outermost blockquote in case someone tried to stack multiple blockquotes. I also want to do the same for the last paragraph inside the first blockquote. Is this possible?

    Posted 14 years ago #
  2. You should be able to this all with styling. Check out this article on css tricks:

    http://css-tricks.com/examples/Blockquotes/

    You would need to alter the "blockquote" tag in your stylesheet.

    Newer browser support the :last property (http://www.w3.org/TR/css3-selectors/#last-child-pseudo) which would allow you to style the last paragraph in a blockquote:

    blockquote p:last {}

    But since this is not supported in IE, you'll likely just need to make sure to class your last paragraph to give it styling. So, for instance:

    blockquote p.last {background-image: url(images/closequote.gif);}

    Posted 14 years ago #
  3. Okay, for the record I got the first part working and decided it looked good enough on its own to not need the second part. It took two separate CSS rules, one for comments and one for content:

    .comment-content > blockquote {}
    will work for comments, and for posts you could use
    .entry-content > blockquote {}

    Posted 14 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.