Better Blockquotes with CSS

Avatar of Chris Coyier
Chris Coyier on

betterblockquotes.gif

Blockquotes are HTML elements that are meant to designate when a particular section of text is being taken from another website or other source. Different browsers have different built-in styling for blockquotes, often just a simple left margin. If you use a lot of quotes, as bloggers often do, it is a good idea to take control of this element and give it some CSS style!

A popular technique is to put large graphical Quotation marks at the upper left and lower right of the blockquote area. In these pre-CSS3, non-multiple-background days, there is no good way to do this without a little extra HTML. The easiest technique is to add a <span> element along with the <blockquote> element. Not ideal, but it works. You can apply most of the styling the blockquote element in your CSS and then set the second background image with the span. Upper left and lower right respectively.

I have put together an example page with 5 different examples of different, simple things you can do with blockquotes.

[LIVE EXAMPLE]

[DOWNLOAD EXAMPLE]