I need to create this on my client's website, but I can't format any CSS or find something similar on the internet, could you help me? The picture looks like this:
Asked
Active
Viewed 57 times
0
-
it's an image, unless you can convince me otherwise – Bravo Oct 17 '19 at 02:29
-
What have you tried so far? Can you show us some code? How do you wish to accomplish this? Please read the [tour](https://stackoverflow.com/tour). – Rojo Oct 17 '19 at 02:30
-
if you want to make it css. the green background is just a box with a padding. and has transform in right side with border orange. – Vincent Dante Oct 17 '19 at 02:31
-
How do I transform that border triangularly? – Victor Gabriel Oct 17 '19 at 02:35
3 Answers
2
This could be either done in CSS or by creating an image. If you are looking to do this in CSS (and there's no problem with that) you are looking for linear-gradient
.
body {
background-color: #C8E2FA;
}
#banner {
text-shadow: 0.8px 0.8px #AAAAAAAA;
font-weight: bolder;
padding: 4px 8px;
width: 100%;
color: #FFFFFF;
background: linear-gradient( 135deg, #0B6566 60%, #FF7149 61%, transparent 19%)
}
<div id="banner">DIVERSOS CURSOS GRATUITOS</div>
Hope this helps,

Miroslav Glamuzina
- 4,472
- 2
- 19
- 33
1
May be something like this using clip-path
.wrapper {
clip-path: polygon(0 0, 100% 0%, 95% 100%, 0% 100%);
position: relative;
}
.content {
background: #0d6568;
color: #fff;
padding: 1em;
z-index: 1;
position: relative;
width: 90%;
clip-path: polygon(0 0, 100% 0%, 95% 100%, 0% 100%);
text-shadow: 2px 2px #000;
}
.wrapper:after {
content: '';
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
background: #cf895c;
}
<div class="wrapper">
<div class="content">
CONTENT
</div>
</div>

Nidhin Joseph
- 9,981
- 4
- 26
- 48
-
1Just be aware support for clip path is currently [far from universal](https://caniuse.com/#feat=css-clip-path). This currently **won't** work on any Microsoft browser. – Jon P Oct 17 '19 at 03:12
1
.ribbon {
position: relative;
display: inline-block;
background-color: #0d6468;
color: #fff;
padding: 10px 60px 10px 12px;
background: linear-gradient(-45deg, transparent 30px, #ce895c 40px, #0d6468 10px) 100% no-repeat;
}
<div class="ribbon">DIVERSOS CURSOS GRATUITOS</div>
See this

sugars
- 1,473
- 7
- 17