html - Ribbon and stars - How to get this done without an image file? -


i need create ribbon , stars (image attached) without image file. know how put stars in it, needing ribbon sides image attached. how can without image file, , pure css , html? thinking border-radius need manipulated here.

just need red ribbon image!

this have far, terrible.

how can use border-radius effect?

i recommend combining css triangles pseudo elements :before , :after side triangles of ribbon, , html character ★ stars:

working jsfiddle

html:

<h1>&#9733; kristine coady &#9733;</h1> <!-- &#9733; html star character --> 

css:

h1{ /* regular attributes here */     background:#a52927;     display:inline-block;     padding:0px 30px;     color:#eee4d3;     position:relative;     height:40px;     line-height:40px; }  h1:before{ /* create white triangle on left side */     position:absolute;     content:"";     top:0px;     left:0px;     height:0px;     width:0px;     border-top: 20px solid transparent;     border-left: 20px solid white;      border-bottom: 20px solid transparent; }  h1:after{ /* create white triangle on right side */     position:absolute;     content:"";     top:0px;     left:auto;     right:0px;     height:0px;     width:0px;     border-top: 20px solid transparent;     border-right: 20px solid white;      border-bottom: 20px solid transparent;  } 

this way not have use wrappers or border-radius.. should ofcourse alter font, font size, height, (etc.) needs..


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -