I'm working on a little css exercise and for some reason I have what appears to be background color leaking out around the boarders of the image. I've tried everything I can think of and I can't get rid of it. It seems like when I remove the background-color property on the inverted-corner class it goes away. Alternatively, removing the border from the inverted-corner class also makes it go away. Unfortunately, that also breaks the design. Any suggestions?
body {
font-family: "Hahmlet", serif;
/* font-family: 'Spectral', serif; */
background-color: lightgrey;
}
.wrapper {
width: 425px;
margin: auto;
position: relative;
top: 150px;
transform: rotate(12deg);
}
.admitOne {
position: absolute;
border-bottom: solid;
font-size: 40px;
text-align: center;
width: 71%;
left: 61px;
}
.cinima {
position: absolute;
font-size: 50px;
top: 53px;
text-align: center;
left: 91px;
}
.lyon {
position: absolute;
border-top: solid;
font-size: 24px;
text-align: center;
width: 71%;
top: 120px;
left: 61px;
padding-top: 2px;
}
/* Numbers */
.number {
position: absolute;
text-align: center;
border-bottom: solid;
font-size: 35px;
width: 35%;
top: 58px;
}
.left {
left: -45px;
transform: rotate(270deg);
}
.right {
right: -45px;
transform: rotate(90deg);
}
/* Corners */
.inverted-corner {
box-sizing: border-box;
position: relative;
background-color: rgb(205, 34, 35);
width: 425px;
height: 200px;
border: solid 15px;
border-left: dotted 3px;
border-right: dotted 3px;
border-color: lightgrey;
}
.inverted-corner:before {
background-image: url("https://assets.codepen.io/4091246/redpaper.png");
content: "";
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
opacity: 40%;
}
.top:before,
.top:after,
.bottom:before,
.bottom:after {
content: "";
position: absolute;
width: 40px;
height: 40px;
background-color: lightgrey;
border: solid 15px lightgrey;
border-radius: 35px;
}
.top:before {
top: -45px;
left: -45px;
}
.top:after {
top: -45px;
right: -45px;
}
.bottom:before {
bottom: -45px;
left: -45px;
}
.bottom:after {
bottom: -45px;
right: -45px;
}
<html>
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Hahmlet&family=Spectral&display=swap" rel="stylesheet">
</head>
<body>
<div class="wrapper">
<div class="inverted-corner">
<div class="content">
<div class="admitOne">ADMIT ONE</div>
<div class="cinima">CINEMA</div>
<div class="number left">081221</div>
<div class="number right">081221</div>
<div class="lyon">Lyon Movie Theaters</div>
</div>
<div class="top" />
<div class="bottom" />
</div>
</div>
</body>
</html>
