Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Created March 18, 2014 15:59
Show Gist options
  • Save gunnarbittersmann/9623025 to your computer and use it in GitHub Desktop.
Save gunnarbittersmann/9623025 to your computer and use it in GitHub Desktop.
hanging punctuation
/**
* hanging punctuation
*/
html
{
font: 1.5em/1.5 Georgia, serif;
padding: 4em;
}
body
{
border-left: 1px solid red;
border-right: 1px solid red;
}
p
{
position: relative;
margin: 1.5em 0;
}
.hanging-punctuation-start
{
position: absolute;
right: 100%;
}
.hanging-punctuation-end
{
position: absolute;
}
footer
{
font-size: 0.75em;
}
<p>Now up comes Ted without any legs<br/>
And in their place there were two wooden pegs<br/>
She kissed him a dozen times or two<br/>
Saying “Holy moly could it be you?<span class="hanging-punctuation-end">”</span></p>
<p><span class="hanging-punctuation-start">“</span>Now was you drunk or was you blind<br/>
When you left your two fine legs behind?<br/>
Or was it out walking upon the sea<br/>
That tore your legs from the knees away?<span class="hanging-punctuation-end">”</span></p>
<footer>(Lyrics taken from “Mrs. McGrath”)</footer>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment