Support » Themes and Templates » Styling blockquote with two images not working

  • I’ve recently been working on a template for my website and I am currently having some frustrating problems with my attempts to properly style my blockquote.

    I am attempting to use this method ( of styling a blockquote with two quotation images.

    For some reason it just doesn’t want to work. The “first letter” part of the CSS doesn’t seem to want to show the image of the opening quotation. Here’s my test page:

    I have also attempted using the <span> method of achieving the same look, but that didn’t work at all.

    Please help, as I am about to rip my hair out over this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Joni


    In your stylesheet, under blockquote.first-letter, change background:... to background-image:... and that should do it. If that fails, put important! after it, like this:

    background: url(images/openquote.jpg) !important;




    [duplicate reply deleted by author]

    the style seems to work only on the first letter if it is directly in the blockquote, and not in a paragraph.
    you can try this behaviour here:
    by editing it to:

    <style type="text/css">
    <blockquote>first text<p>You can use the :first-letter pseudo-element to add a special effect to the first character of a text!</p></blockquote>

    Hey guys,

    Thanks for replying. I tried both of the techniques you suggested, both separately and together. The !important; tag didn’t work, sadly, and styling the first letter and keeping it out of the paragraph only moved the first letter outside of the paragraph. The color and font size attributes didn’t work at all.

    I’m finding this strange, considering that in my raw HTML test page, the blockquote worked perfectly. Something in WordPress must be blocking the styling. I don’t know.



    The test sample that you provided worked on all my browsers. There are 7 other errors in your stylesheet, however; so maybe fixing those will cause this code to behave properly. Validate and view errors here:



    Also fix your HTML errors (you can find those in the header.php and other template files).

    And classes (.sample) should be used when an element appears more than once on a page. Don’t use IDs (#sample) if an element appears more than once on a page. Fix your template code to reflect <div class="box"> rather than <div id="class"> and that will take care of that.

    Then just edit your stylesheet to change this line from this:
    #box {...

    to this:
    .box {...

    this worked in firefox developer add-on (after taking the paragraph away from the single T at the beginning of the quote):

    blockquote {
    background-image: url(;
    background-repeat: no-repeat;
    background-position: right bottom;
    padding-left: 10px;margin-left:0px;
    padding-right: 40px;
    font-style: italic;
    blockquote p:first-child {
    background-image: url( !important;
    background-repeat: no-repeat;
    background-position: left top;
    font-style: italic;padding-top:10px;padding-left:40px;
    blockquote p {padding-left:40px;}

    Thanks to all of you for the help with my little problem. I really appreciate it. I’ll still have to validate my coding at the end of all of my tweaking, but nevertheless, alchymyth, your coding worked out for me just fine. Thanks so much!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Styling blockquote with two images not working’ is closed to new replies.