Skip to main content

Automatic pullquotes with JavaScript and CSS | 456 Berea Street

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

Bookmark History

Saved by 14 people (1 private), first by anonymouse user on 2006-09-19


Public Sticky notes

Automatic pullquotes with JavaScript and CSS

As you may have noticed, there are now pullquotes in some articles on this site. I think they can be a nice design element and a good way of highlighting important phrases. As with most things there are several ways of creating pullquotes, the most straightforward being copying the text you want and paste it into a blockquote element. I didn’t want to do that for several reasons.

The main reason is the amount of work involved. I could go through my older articles to add pullquotes, but what if I should decide that I no longer want pullquotes? I’d have to go through every article again to remove the quotes. Lots of work. I wanted a way to add pullquotes without having to duplicate text in the markup, and came up with a JavaScript based technique.

Highlighted by ktenney