How to customize quote character fields added with CSS
I am trying to add quotes using CSS only. This works, but I would like to omit the quotes regarding the content inside them. This is what it currently looks like:
HTML:
<p id="quote">This is a quotation.</p>
CSS:
#quote {
}
#quote:before {
content: "\201C";
font-family: Garamond, Palatino, Roman, "Times New Roman", serif;
font-size: 36pt;
}
#quote:after {
content: "\201D";
font-family: Garamond, Palatino, Roman, "Times New Roman", serif;
font-size: 36pt;
}
And JS Fiddle .
I tried adding a top margin to #quote:before
and #quote:after
, but that seems to be the case for the text between the quotes as well (even if I specifically add a zero or negative top marker to it). I've also tried filling and creating various inline-block elements.
Is there a way to move just the quotes down with CSS? I would rather avoid changing the HTML structure or adding images, and I believe this should be possible.
source to share
Try adding:
position: relative;
top: 19px;
before #quote:before
and #quote:after
.
I've also added some additions to both quotes ...
JSFiddle: http://jsfiddle.net/leniel/GAaBT/
source to share