Saturday, August 24, 2013

How to Add Simple and Nice Blockquote Styling

How to Add Simple and Nice Blockquote Styling
Blockquote by default displays in all standards-compliant browsers with the "big quotes before" effect, and in Internet Explorer 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.

Here CSS code:

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