:root{ --white:#fff; --color:#0652DD; --background:#dfe4ea; } .ribbon{ color: var(--white); font-family: "Chocolate Classical Sans", sans-serif; font-size: 24px; font-weight:900; width:100px; text-transform: capitalize; position: relative; padding: 50px 10px; margin: 0 auto; } .ribbon h3{ background: var(--color); font-size: 19px; font-weight: 500; text-transform: capitalize; position: relative; padding: 40px 15px; display: inline-block; clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%); box-shadow: inset rgba(0, 0, 0, 0.5) 0px 15px 10px -10px; transform: translateX(-50%); position: absolute; top: 0; left: 50%; margin: 0 auto; } .ribbon.red{ --color: #eb2f06; } .ribbon.green{ --color:#02a300; } .ribbon.purple{ --color:#8626af; } @media screen and (max-width:990px){ .ribbon{ margin-bottom: 50px; } } @media screen and (max-width:990px){ .ribbon{ margin-bottom: 50px; } }