Skip to content

Instantly share code, notes, and snippets.

@pedrodelgallego
Created March 12, 2013 04:33
Show Gist options
  • Save pedrodelgallego/5140375 to your computer and use it in GitHub Desktop.
Save pedrodelgallego/5140375 to your computer and use it in GitHub Desktop.
Untitled
<style type="text/css" media="screen">
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.elem {
border: solid #6AC5AC 3px;
position: relative;
}
.elem p {
padding: 0 1em;
}
.elem-inline .label, .elem-inline .endlabel {
position: static;
}
.label, .endlabel {
position: absolute;
background-color: #6AC5AC;
color: #414142;
line-height: 1em;
}
.label {
top: 0;
left: 0;
padding: 0 3px 3px 0;
}
.endlabel {
right: 0;
bottom: 0;
padding: 3px 0 0 3px;
}
.elem-green {
border: solid #FDC72F 3px;
}
.elem-green > .label, .elem-green > .endlabel{
background-color: #FDC72F;
}
.elem-red {
border: solid #D64078 3px;
}
.elem-red > .label, .elem-red > .endlabel{
color: white;
background-color: #D64078;
}
.elem-orange {
border: solid #96C02E 3px;
}
.elem-orange > .label, .elem-orange > .endlabel{
background-color: #96C02E;
}
</style>
<section class="elem three-column ipsum">
<span class="label">&lt;div class="three-column"&gt;</span>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus imperdiet, nulla et dictum interdum, nisi lorem egestas odio, vitae scelerisque enim ligula venenatis dolor. Maecenas nisl est, ultrices nec congue eget, auctor vitae massa. Fusce luctus vestibulum augue ut aliquet. Mauris ante ligula, facilisis sed ornare eu, lobortis in odio. Praesent convallis urna a lacus interdum ut hendrerit risus congue. Nunc sagittis dictum nisi, sed ullamcorper ipsum dignissim ac. In at libero sed nunc venenatis imperdiet sed ornare turpis. Donec vitae dui eget tellus gravida venenatis. Integer fringilla congue eros non fermentum. Sed dapibus pulvinar nibh tempor porta. Cras ac leo purus. Mauris quis diam velit.
</div>
<span class="endlabel">&lt;/div&gt;</span>
</section>
// alert('Hello world!');
{"view":"split","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