Can anyone tell me why this (also available live at http://jsfiddle.net/A2eTG/6/) renders a "
symbol before the blockquote in Firefox but not Chrome/Safari?
blockquote
{
padding: 0 60px;
padding:10px;
padding-left:55px;
}
blockquote:before {
display: block;
font-size: 700%;
content: open-quote;
height: 1px;
margin-left: -0.55em;
position:relative;
top:-20px;
}
The blockquote:before
selector shows up in Chrome's developer tools but doesn't appear on screen.
What gives?
You can add quotation marks to a <blockquote> using CSS pseudo elements. The <q> element comes with quotation marks baked in so they need not be added, however adding them as pseudo-elements can be a workaround for older browsers that don't automatically add them.
The <div class="column-quote"> tag and its closing </div> tag create a container for the featured quote with the style rules you declared for the column-quote class in your styles. css file.
The easiest way to style the blockquote tag: it consists in applying a shift, put the text in italics, and change the font.
I think the best solution would be
content: '“';
content: open-quote;
That way browsers that support open-quote
would use it and ignore the earlier content
value, while browsers that don't know what open-quote
is will ignore that line and use the first one.
To help others who came across this and want prettier quotes than "
, these are the codes for double open, double closed, single open, and single closed quotation marks respectively: "\201C"
, "\201D"
, "\2018"
, "\2019"
.
Looks like Chrome doesn't support content: open-quote
. Try this instead:
content: "\"";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With