The red border is just for visual reference. I attempted using overflow: hidden
but it didn't yield the desired outcome. My goal is to achieve the same border radius as the red border. Is there something amiss in my approach? Appreciate your assistance.
*,*::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
--violet: #8F00FF;
}
.rating {
border: 1px solid red;
border-radius: 8px;
width: 30px;
margin-left: 100px;
margin-top: 100px;
background-color: #f0f0f0;
display: flex;
flex-direction: column;
box-shadow: -5px 0px 8px rgba(172, 169, 169, 0.1);
}
button {
border: none;
border-radius: 8px;
align-items: center;
color: var(--violet);
font-weight: bold;
cursor: pointer;
-webkit-border-radius:10px;
overflow: hidden;
}
.rating span {
display: flex;
justify-content: center;
color: var(--violet);
font-weight: bold;
}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE-edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Interface</title>
<!-- CSS Link -->
<link rel="stylesheet" href="style.css">
<!-- Boxicons -->
<script src="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7e6d60667068646b486a6665667c">[email protected]</a>/dist/boxicons.js"></script>
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95ece1f4eef9ecfad3fffbfefff1cbddf4f2f4f8fbe792eebff2fcf4c0f1effadbb8cabfdd">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- JS Link -->
<script src="script.js" defer></script>
</head>
<body>
<!-- <div class="single-card">
</div> -->
<div class="rating">
<button>+</button>
<span>12</span>
<button>-</button>
</div>
</body>
</html>