<article>
<h1>Main <br> heading mooooooooooo oooooo oooooo ooo </h1>
<p>Sub text - let's make the sub text a bit longer and see what happens when it crosses the :after</p>
</article>
CSS
body {
background-color: #CCC;
font: 1em/1.2 Tahoma, Arial, sans-serif;
margin: 1em;
}
article {
background-color: #FFF;
margin: 0 auto;
padding: 20px;
width: 960px;
}
h1 {
/* Generate the gradient so it loads quickly and scales with the heading
http://www.colorzilla.com/gradient-editor/ */
background: #0558b1;
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzA1NThiMSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxMDIxOGIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0558b1), color-stop(100%, #10218b));
background: -webkit-linear-gradient(top, #0558b1 0%, #10218b 100%);
background: -moz-linear-gradient(top, #0558b1 0%, #10218b 100%);
background: -ms-linear-gradient(top, #0558b1 0%, #10218b 100%);
background: -o-linear-gradient(top, #0558b1 0%, #10218b 100%);
background: linear-gradient(to bottom, #0558b1 0%, #10218b 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0558b1', endColorstr='#10218b', GradientType=0);
color: #FFF;
font-size: 1.4em;
font-weight: bold;
margin: 1em 0 1em -30px;
/*overflow: hidden;*/
/* Make sure the heading had padding-right enough for a few lines of the
slant and ensure that the position is relative - do not add left and top
values! */
padding: 5px;
padding: 5px 150px 5px 30px;
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.