Ok, so I have asked a question and received help on creating an image with pure CSS, located here: Ribbon and stars - How to get this done without an image file?
But this method, puts a border-color
on the image sides in order to make the ribbon corner effect. But now I need to do something like the image below:
So, not sure how to do this using the method of the Ribbon provided here (if even possible): http://jsfiddle.net/a498M/1/
I believe that this is possible to do in CSS with HTML, just need some help on how to implement this. Here is the code I have so far on this:
CSS:
div.name_container {
text-align: center;
}
h1 {
font-family: "MissionGothic-Regular", "Mission Gothic Regular Regular", "mission_gothicregular";
font-size: 2.2em;
margin: 0 auto;
background:#BF2C24;
display: inline-block;
padding: 0 1.5em;
color: #f2efe9;
position: relative;
height: 1.4em;
line-height: 1.4em;
text-transform: uppercase;
z-index: 10;
}
h1:before { /* this will create white triangle on the left side */
position: absolute;
content: "";
top: 0px;
left: 0px;
height: 0px;
width: 0px;
border-top: .7em solid transparent;
border-left: .7em solid #f2efe9;
border-bottom: .7em solid transparent;
z-index: 8;
}
h1:after { /* this will create white triangle on the right side */
position: absolute;
content: "";
top: 0px;
left: auto;
right: 0px;
height: 0px;
width: 0px;
border-top: .7em solid transparent;
border-right: .7em solid #f2efe9;
border-bottom: .7em solid transparent;
z-index: 8;
}
h1 span.sidestar-left, h1 span.sidestar-right {
position: absolute;
font-size: .6em;
top: 0;
}
h1 span.sidestar-left {
left: 1.8em;
}
h1 span.sidestar-right {
right: 1.8em;
}
HTML:
<div class="name_container">
<h1><span class="sidestar-left">★</span> Kristine Coady <span class="sidestar-right">★</span></h1>
</div>
So, I need to add a div
element somehow underneath of this ribbon, but how can I do this without it looking like this?
So, the h1:after
and h1:before
is causing this issue. Is it possible to get this ribbon effect without this bordering which is causing the color problem? I need it to look like the first image, where it it transparent and the image under it shows through, or maybe I can give the top-half of the border 1 color and the bottom-half of the border a different color perhaps? but How??