Try this code here:
body {
margin: 0;
padding: 0;
font-family: Verdana, sans-serif;
}
.container {
display: flex;
justify-content: center;
margin-top: 40px;
}
.banner {
background-color: blue;
color: white;
width: 600px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
}
.banner span {
font-size: 2rem;
}
.left-triangle {
width: 0px;
height: 0px;
border: 30px solid blue;
border-left: 20px solid white;
transform: translateX(20px);
}
.right-triangle {
width: 0px;
height: 0px;
border: 30px solid blue;
border-right: 20px solid white;
transform: translateX(-20px);
}
<html>
<body>
<div class="container">
<div class="left-triangle"></div>
<div class="banner">
<span>Shop Sales</span>
</div>
<div class="right-triangle"></div>
</div>
</body>
</html>
The trick to get your triangles is to create divs with zero width and height, but with borders.