Lego2012
9/26/2016 - 10:05 PM

Simple and Nice Blockquote Styling

Simple and Nice Blockquote Styling

/* 
The blockquote displays in standards-compliant browsers with the "big quotes before"
effect, and in IE with a thick left border and a light grey background.
Unlike other blockquote techniques, this style does not require a nested block-level 
element (like p). As such, it turns a paragraph into an inline-styled element to keep 
the content from dropping below the quote. 
*/

blockquote {
  background: #f9f9f9;
  border-left: 10px solid #ccc;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
  color: #ccc;
  content: open-quote;
  font-size: 4em;
  line-height: 0.1em;
  margin-right: 0.25em;
  vertical-align: -0.4em;
}
blockquote p {
  display: inline;
}