In this example http://jsfiddle.net/aNmvc/15/ the red ribbon should touch the the edges of div
which has border. How to achieve that?
Is there a way to get border inside or something else?
HTML
<div class="box">
<div class="corner">
<span href="#">Best Ribbon around</span>
</div>
<img src="http://lorempixel.com/250/300/sports/1/">
</div>
CSS
.box {border:2px solid green; position:relative;padding:3%; width:260px; background:#ccc; overflow:hidden;}
.corner {
background-color: #a00;
overflow: hidden;
position: absolute;
left: -3em;
top: 2.5em;
-moz-transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.corner span {
border: 1px solid #faa;
color: #fff;
display: block;
font-size:.8em;
font-weight:bold;
padding: 0.5em 4em;
text-align: center;
text-decoration: none;
text-shadow: 1px 1px 1px #000;
}