If you're searching for information on the border-radius
properties, you'll find that they can be individually specified.
In particular, you should take note of border-top-left-radius
and border-bottom-left-radius
on
.home_header_buttons .btn_home:first-child
, as well as
border-top-right-radius
and
border-bottom-right-radius
on
.home_header_buttons .btn_home:last-child
.
I've used a value of 50px
for each in my example. Take a look at the code snippet below to see it in action:
.home_header_buttons {
display: flex;
}
.home_header_buttons .btn_home {
position: relative;
text-transform: uppercase;
font-family: 'Poppins', sans-serif;
font-weight: 500;
font-size: 20px;
letter-spacing: 2.4px;
margin-right: -2.4px;
line-height: 13px;
background-color: rgba(8, 17, 23, .5);
border: 1px solid #173c3d;
padding: 30px 60px;
}
.home_header_buttons .btn_home:first-child {
color: #16dcf3;
border-right: none;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
}
.home_header_buttons .btn_home:first-child::after {
content: '';
position: absolute;
display: block;
background: radial-gradient(circle at center, #007278 20%, #0b111a 100%);
width: 1px;
height: 90%;
top: 50%;
transform: translateY(-50%);
right: 0;
z-index: 1;
}
.home_header_buttons .btn_home:last-child {
color: #64ffb1;
border-left: none;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
}
<div class="home_header_buttons">
<a href="#" class="btn_home">Coaching</a>
<a href="#" class="btn_home">Order now</a>
</div>
When it comes to adding color, remember that you cannot directly color individual corners. Instead, utilize border-left-color
and border-right-color
to apply color to the border edges:
.home_header_buttons {
display: flex;
}
.home_header_buttons .btn_home {
position: relative;
text-transform: uppercase;
font-family: 'Poppins', sans-serif;
font-weight: 500;
font-size: 20px;
letter-spacing: 2.4px;
margin-right: -2.4px;
line-height: 13px;
background-color: rgba(8, 17, 23, .5);
border: 1px solid #173c3d;
padding: 30px 60px;
}
.home_header_buttons .btn_home:first-child {
color: #16dcf3;
border-right: none;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-left-color: blue;
}
.home_header_buttons .btn_home:first-child::after {
content: '';
position: absolute;
display: block;
background: radial-gradient(circle at center, #007278 20%, #0b111a 100%);
width: 1px;
height: 90%;
top: 50%;
transform: translateY(-50%);
right: 0;
z-index: 1;
}
.home_header_buttons .btn_home:last-child {
color: #64ffb1;
border-left: none;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
border-right-color: green;
}
<div class="home_header_buttons">
<a href="#" class="btn_home">Coaching</a>
<a href="#" class="btn_home">Order now</a>
</div>
To expand these colors further, make use of border-top-color
and border-bottom-color
, but note that this will color the entire edge uniformly:
.home_header_buttons {
display: flex;
}
.home_header_buttons .btn_home {
position: relative;
text-transform: uppercase;
font-family: 'Poppins', sans-serif;
font-weight: 500;
font-size: 20px;
letter-spacing: 2.4px;
margin-right: -2.4px;
line-height: 13px;
background-color: rgba(8, 17, 23, .5);
border: 1px solid #173c3d;
padding: 30px 60px;
}
.home_header_buttons .btn_home:first-child {
color: #16dcf3;
border-right: none;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-left-color: blue;
border-top-color: blue;
border-bottom-color: blue;
}
.home_header_buttons .btn_home:first-child::after {
content: '';
position: absolute;
display: block;
background: radial-gradient(circle at center, #007278 20%, #0b111a 100%);
width: 1px;
height: 90%;
top: 50%;
transform: translateY(-50%);
right: 0;
z-index: 1;
}
.home_header_buttons .btn_home:last-child {
color: #64ffb1;
border-left: none;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
border-right-color: green;
border-top-color: green;
border-bottom-color: green;
}
<div class="home_header_buttons">
<a href="#" class="btn_home">Coaching</a>
<a href="#" class="btn_home">Order now</a>
</div>