Simple CSS Blockquotes and Pullquotes

By Imar

A user-friendly blog layout encourages mere visitors to become readers, so maybe you want to spice things up a little… How about some sweet blockquotes and saucy pullquotes?

There is usually more than one way to skin a cat when it comes to CSS, but here’s my suggestion:

Blockquotes

  • When to use blockquotes
    A blockquote is used when quoting text from another source, usually another blog or website. Blockquotes are intended to accommodate a larger amount of text, so as a rule of thumb, use blockquotes when you are quoting more than one or two sentences. Don’t forget to link back to the source.
  • Example
    In an article on Wisdump, J David Macor writes:

    Everyone knows to use block quotes as a way to highlight, well, a quote. And while this is a good technique to use, you should also try a pull quote every once in a while.

    As you can see, I went for the tried and tested over-sized quotation marks to give the blockquote some visual appeal.

  • Images
    You will need to create two images – the opening and closing quotation marks. What they look like is up to you!
  • The CSS
    .blockquote {
    background-image: url(images/open-quote.gif);
    background-repeat: no-repeat;
    background-position: left 5px;
    padding-left: 30px;
    font-style: italic;
    }
    .blockquote span {
    background-image: url(images/close-quote.gif);
    background-repeat: no-repeat;
    background-position: right bottom;
    display: block;
    padding-right: 30px;
    }
  • The HTML
    <blockquote><span>Everyone knows to use block quotes as a way to highlight, well, a quote. And while this is a good technique to use, you should also try a pull quote every once in a while.</span></blockquote>
    Note the span to accomodate the closing quotation marks.

Pullquotes

  • When to use pullquotes
    teasers intended to draw the attention of a viewer Pullquotes are teasers intended to draw the attention of a viewer by giving a sneak preview of the content. They are quite common in magazines and newspapers and are usually short extracts from the article. Pullquotes are usually separated from the rest of the text by appearing in a bigger, or different font. They often contain surprising, interesting or important snippets, without giving too much away! A pullquote is a focal point on the page. Use them sparingly – more than one or two pullquotes per article, will defeat the purpose.
  • The problem…
    Unlike blockquotes, there is no HTML element for pullquotes. Since the text of a pullquote appears twice on the page (once in the article and once in the pullquote) you should try and distinguish between the two in your markup. I suggest using a heading element for the pullquote.
  • The CSS
    .pullquote {
    padding: 10px;
    float: right;
    width: 200px;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 20px;
    border-top-width: 2px;
    border-bottom-width: 2px;
    border-top-style: solid;
    border-bottom-style: solid;
    border-top-color: #694e1c;
    border-bottom-color: #694e1c;
    font-size: 16px;
    text-align: center;
    line-height: 36px;
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
    font-weight: normal;
    }
  • The HTML
    <h4 class="pullquote">put the text for the pullquote here</h4>

The overall layout of the header, sidebar(s), navigation and footer is important for the success of any blog, but that’s not where it ends – don’t forget the layout of your text! A user-friendly content layout will engage visitors, encouraging them to read your blog.

Add your thoughts below!

Post to Twitter Post to Facebook

Comments

57 Comments on “Simple CSS Blockquotes and Pullquotes” so far

  1. Jon Wilson Says:

    Honestly, I do enjoy a good pullquote.

  2. redwall_hp Says:

    I used to use pullquotes, but I forgot to put an entry for them in webmaster-source’s stylesheet after I redesigned it. I need to do that soon.

  3. SkyLuke Says:

    Nice. Thank you.

  4. yichi Says:

    It’s definitely nice pullquote, I thought it was kinda divs before.

  5. Allen Baranov Says:

    Excellent article. Thank you very much.

    Now I need to rush out and play with my blog.

  6. Blogsolid Says:

    I am glad you found this useful!

  7. Manny Fresh Says:

    Wow, nice article!! I’ve been wanting to add these 2 elements into some sites I have designed but hadn’t really researched it. You make is look easy to manage and work. Thanks for the info! :-)

  8. Nekoyo Says:

    Thanks for that article, it explains really nicely how to use pullquotes, which I really didn’t know before! You are a huge help, this blog is great! You’ve just gained another reader :-)

  9. Blogsolid Says:

    Hi Nekoyo, good to have another reader on board! Thanks for letting me know about the colour variation on the image below the navigation. I hope it is sorted out now :-)

  10. Javier Says:

    Thanks :)

  11. sbpoet Says:

    Wow.

    As a TypePad useer who does not use advanced templates, I have access to CSS, but not to Stylesheets.

    Would these work for me?

    I’m hoping so.

  12. Jenny Says:

    I’ve always wondered how you do pullquotes. I’ve been wanting to use them for a while. Thanks for the tips, I’m definately going to use them.

  13. Melissa Says:

    Great technique for pullquotes, it is interesting how there are many ways to display things the same way though, as I do it slightly differently!

  14. Blogsolid Says:

    Hey Jenny and Melissa

    Your blogs look similar, are you sisters or something? :)

    That’s one cool (and confusing) thing about CSS – there are usually a few different ways to solve any problem!

  15. bart Says:

    Nice technique, although the span should be a block-level element such as a p or a div.

  16. qrayg Says:

    Great article. The CSS could be condensed more though:

    .pullquote {
    margin: 10px 0 10px 20px;
    border-top: 2px solid #694E1C;
    border-bottom: 2px solid #694E1C;
    padding: 10px;
    float: right;
    width: 200px;
    font: italic normal 16px/36px Arial, Helvetica, sans-serif;
    text-align: center;
    }

  17. philip Says:

    great tips

    just an FYI: roger johansson has developed a nice way to make pullquotes without creating redundant markup. his method requires a teeny bit of javascript, but it leaves your markup cleaner.

    http://www.456bereastreet.com/.....t_and_css/

  18. Nelson Menezes Says:

    Good article; nice CSS. A recommendation, though: since the pullquote is a repeat of some of the body text, it doesn’t make much sense semantically to actually repeat it in the HTML (think screen readers).

    It would probably be best to auto-generate the pullquotes using Javascript: any spans with “pullquote” class can be scanned and a pullquote floating DIV generated on the fly for each one.

  19. Blogsolid Says:

    Hi grayg, thanks for cleaning up the code. I am working on an article about “cleaner css”, so hopefully I will post that someday!

    Philip and Nelson, thanks for the tip! I am often hesitant to use Javascript, simply because I am not very familiar with it. I will have to explore that technique. I have seen it used very effectively on some websites.

  20. Scott Says:

    I agree that the span should be replaced with a p tag within the blockquote. I also use the blockquote element with a class “pull” rather than the heading to create the pull quote effect on my blog.

    “sbpoet” – your comment makes no sense. CSS is an acronym for cascading style sheet. CSS and stylesheets are the same thing.

  21. Mark Eagleton Says:

    Inline elements can’t contain block level elements, and sometimes it is necessary to quote multiple paragraphs within a blockquote. In fact, this is what blockquote elements are primarily intended to do. A span element isn’t going to work for most applications.

    A blockquote element can contain multiple p elements. In this case, attaching your closing quote image to all child p elements, would result in multiple images. It would be more effective to assign the closing quote image to a generic class that you can give the last child element of the blockquote:

    blockquote .last { background: url('image.jpg') no-repeat right bottom; }

    Then give the last block level element in your blockquote a class of last.

  22. Scott Says:

    This will only work in advanced browsers, but I wanted to point it out in lieu of Mark’s last comment.

    Rather than manually placing a class on the last paragraph tag, the last-child pseudo class (blockquote p:last-child) could be applied with the same CSS that Mark has outlined. This will automatically place the style on the last paragraph that it a child of a blockquote.

  23. Khristian Says:

    Nice style! I think I’ll use it on my blog. And I hope you don’t mind, I’m planning on using your quote-images until I can find some of my own.
    o/

  24. Idetrorce Says:

    very interesting, but I don’t agree with you
    Idetrorce

  25. Innocent Bystander » Blog Archive Says:

    [...] Simple CSS Blockquotes and Pullquotes. A handy tutorial for later. [...]

  26. Some Readers’ Links » Webmaster-Source Says:

    [...] Simple CSS Blockquotes and Pullquotes [...]

  27. 101 CSS Techniques Of All Time- Part2 Says:

    [...] Simple CSS Blockquotes and Pullquotes- Blogsolid shows us how to get some sweet blockquotes and saucy pullquotes? [...]

  28. test Says:

    [...] Simple CSS Blockquotes and Pullquotes- Blogsolid shows us how to get some sweet blockquotes and saucy pullquotes? [...]

  29. Ulises Says:

    Thank you! I really love those pullquotes!

    I’ve to say I had some troubles with your css and html, i don’t know exactly why cause i don’t know anything about css. lol
    I just changed “.pullquote” for “.post-content pullquote” in the style.css
    and when i want to use i write text on wordpress.
    I don’t know why but with “.pullquote” and with your html it didn’t work. :s

  30. 101?CSS????????(?) | ???? Says:

    [...] Simple CSS Blockquotes and Pullquotes-???????????blockquotes. [...]

  31. Odahkim Says:

    Thanks for pullquote, i will need it soon or later.

  32. Recursos y Tutoriales » Blog Archive » Tecnicas Css 1ª parte Says:

    [...] Simple CSS Blockquotes and Pullquotes- Blogsolid shows us how to get some sweet blockquotes and saucy pullquotes? [...]

  33. Web Designer Group Says:

    Thanks for such nice design of your blog except color scheme, too much contrast. The post is useful. Introduction to pullquotes and usage of both, pull quotes and double quotes, depicted by you, is very good.

  34. Hotlink caller ringtone Says:

    Hotlink caller ringtone

    Free download mobile ringtone

    Free cricket ringtones

    Free cricket ringtone

  35. air mattress Says:

    air mattress

    angela penbrook

    angels wife lovers

    anika noni rose http

    animal porn

    animated christmas cards

    animated emoticons

    aniston cox kiss

    aniston sedu hairstyles

    anonib

    anti depressive living prescription

    anytime organizer

    anyvi…

  36. Block Quotes and Pull Quotes: Examples and Good Practices | Design Showcase | Smashing Magazine Says:

    [...] Simple CSS Blockquotes and Pullquotes [...]

  37. Block Quotes and Pull Quotes: Examples and Good Practices Says:

    [...] Simple CSS Blockquotes and Pullquotes [...]

  38. Block Quotes and Pull Quotes: Examples and Good Practices - Billy Blog Says:

    [...] Simple CSS Blockquotes and Pullquotes [...]

  39. ?? » Blog Archive Says:

    [...] Simple CSS Blockquotes and Pullquotes-???????????blockquotes. [...]

  40. Best Solution for Web :: 101 CSS Techniques Of All Time :: July :: 2008 Says:

    [...] Simple CSS Blockquotes and Pullquotes- Blogsolid shows us how to get some sweet blockquotes and saucy pullquotes? [...]

  41. Four New Blockquotes And How You Can Make Them Says:

    [...] Quotes And Pull Quotes – Examples & Good Practices Simple CSS Blockquotes and Pullquotes Six Ways To Style [...]

  42. online çiçek Says:

    very nice,
    thanks

  43. Free Adobe Photoshop Tutorials » Blog Archive » Resources for Styling Blockquotes Says:

    [...] Simple CSS Blockquotes and Pullquotes [...]

  44. Mike Says:

    Where exactly on the blogspot template do you put the following pullquote code:
    .pullquote {
    padding: 10px;
    float: right;
    width: 200px;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 20px;
    border-top-width: 2px;
    border-bottom-width: 2px;
    border-top-style: solid;
    border-bottom-style: solid;
    border-top-color: #694e1c;
    border-bottom-color: #694e1c;
    font-size: 16px;
    text-align: center;
    line-height: 36px;
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
    font-weight: normal;
    }

  45. Tips dan Triks Memperindah Tulisan Artikel Di Blog | Joko Supriyanto Weblog Says:

    [...] blockquote.left { width: 200px; margin: 5px 15px 5px 0; font-size: 1.4em; text-align: center; color: #abafb9; background: none; border: none !important; padding: 0 !important; float: left; } blockquote.right { width: 200px; margin: 5px 15px 5px 0; font-size: 1.4em; text-align: center; color: #abafb9; background: none; border: none !important; padding: 0 !important; float: right; } Cara untuk memasukan di setiap postingan hanya dengan menulis code ini di setiap dimana pullquote tsb akan di posisikan, < blockquote class=”left”>tulisan ada di sini< /blockquote >, jika ingin di posisi kanan tinggal ganti left ke right saja. Sumber dr sini [...]

  46. Kampanye Damai Pemilu Indonesia 2009 » Blog Archive » Tips Memperindah Tulisan Artikel Di Blog Says:

    [...] blockquote.left { width: 200px; margin: 5px 15px 5px 0; font-size: 1.4em; text-align: center; color: #abafb9; background: none; border: none !important; padding: 0 !important; float: left; } blockquote.right { width: 200px; margin: 5px 15px 5px 0; font-size: 1.4em; text-align: center; color: #abafb9; background: none; border: none !important; padding: 0 !important; float: right; } Cara untuk memasukan di setiap postingan hanya dengan menulis code ini di setiap dimana pullquote tsb akan di posisikan, < blockquote class=”left”>tulisan ada di sini< /blockquote >, jika ingin di posisi kanan tinggal ganti left ke right saja. Sumber dr sini [...]

  47. » 16+ Easy CSS Techniques that Simplify the Webdesigner’s Life WebAir Blog Says:

    [...] Simple CSS Blockquotes and Pullquotes [...]

  48. ??? » Blog Archive » 101?CSS????????(?) Says:

    [...] Simple CSS Blockquotes and Pullquotes-???????????blockquotes. [...]

  49. How to create pullquotes in CSS | smashill - creative ways to capitalize on yourself Says:

    [...] Blogsolids article is a really simple way to implement blockquotes, and is the base I used to create the pullquotes on this site. [...]

  50. Tips Memperindah Tulisan Artikel Di Blog « Erwinjie’s Blog Says:

    [...] blockquote.left { width: 200px; margin: 5px 15px 5px 0; font-size: 1.4em; text-align: center; color: #abafb9; background: none; border: none !important; padding: 0 !important; float: left; } blockquote.right { width: 200px; margin: 5px 15px 5px 0; font-size: 1.4em; text-align: center; color: #abafb9; background: none; border: none !important; padding: 0 !important; float: right; } Cara untuk memasukan di setiap postingan hanya dengan menulis code ini di setiap dimana pullquote tsb akan di posisikan, < blockquote class=”left”>tulisan ada di sini< /blockquote >, jika ingin di posisi kanan tinggal ganti left ke right saja. Sumber dr sini [...]

  51. Resources for Styling Blockquotes | News | Tutorial Blog Says:

    [...] Simple CSS Blockquotes and Pullquotes [...]

  52. 20 FREE Online CSS Resources to Quickly Enhance Your Website Design | Tips for Easily Creating Websites Says:

    [...] 15. Stylized CSS Blockquotes and Pullquotes [...]

  53. Andy J Cruz Says:

    Will this work on a WordPress blog? I have been trying to insert it but not working just yet.

  54. Give Magazine Style Font to Yours Blogger Wordpress Blog Post | Digji.com Says:

    [...] Simple CSS Pullquotes [...]

  55. Height Says:

    Hello. I am new to Wordpress. I am trying to use Blockquote. I saved the two quote images in the WP-Admin folder, and in the CSS I used the following lines:

    .blockquote {background-image: /home/tallrorg/public_html/wp-admin(images/Open Quotes.jpg); background-repeat: no-repeat; background-position: left 5px; padding-left: 30px; font-style: italic;}
    .blockquote span {background-image: /home/tallrorg/public_html/wp-admin(images/Close Quotes.jpg); background-repeat: no-repeat; background-position: right bottom; display: block; padding-right: 30px;}

    For some reason though, it wasn’t pulling the images on the site. I made the right HTML references also. Do you know why this is happening? What did I do wrong here?

  56. Matt Lukan Says:

    Height,
    Unfortunately you made a few errors here:

    You should place the images in your template folder not the wp-admin folder. Usually the best place for images is “wp-content/templates/your-template-name/images(or other folder name where the images are)” and than in the CSS reference a relative path: {background-image: url (images/your-image.jpg)} without the first slash. If you place your images in wp-admin, they will be removed by the system at each system update
    If you want to keep them in the wp-admin anyway (what I would discourage), you should give a path starting from the folder in which your wp instalation resides, not from the top folder on your server. In your case, this would be the public_html, so your code should look like this: {background-image: url (/wp-admin/images/your-image.jpg);} – the whole path goes into the brackets and you place url before the brackets.

    I hope this will help.

  57. Man Cave Chronicle Says:

    Thanks for the css tips. Will be incorporating both examples in my blog. Also, thanks to the condensed version by qrayg.

Leave a Comment