I received the design below from a design team and am unsure of what the best way is to create the transparent border/margin between the pink add button and the navigation bar.
My html and css are included below, but instead of using a border with a specific colour, I would like the border to be transparent through the Navbars (if that makes sense). My reason for this is that the Navbars and button will be used on different pages with different background colours, so having a fixed border colour is not ideal.
/* Remove default html margin */
html, body {
margin: 0;
padding: 0;
width: 100%;
background-image: linear-gradient(147deg, #6c318f, #262262);
}
/* Place the navbar at the bottom of the page, and make it stick */
.navbar {
background-color: white;
overflow: hidden;
position: fixed;
box-sizing: border-box;
bottom: 0;
width: 100%;
}
/* Style the links inside the navigation bar */
.navbar a {
display: block;
text-align: center;
padding: 14px 16px;
text-decoration: none;
box-sizing: border-box;
width: 20%;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
/* Remove inherent hover color for link */
.navbar a.active {
color: white;
}
/* Bottom navbar icon */
.bottom-nav-icon {
width: 24px;
height: 24px;
object-fit: contain;
opacity: 0.4;
}
/* Active/Hover bottom navbar icon */
.bottom-nav-icon.active, .bottom-nav-icon:hover {
opacity: 1;
}
/* Circular button */
.buy-button {
position: fixed;
/* fix the button to the bottom centre and show above other elements*/
right: 0;
left: 0;
bottom: 28px;
margin-right: auto;
margin-left: auto;
z-index: 5;
/* style the button */
background-color: #ec008c;
color: white;
text-align: center;
display: inline-block;
width: 56px;
height: 56px;
font-size: 16px;
border-radius: 50%;
/* create border around button - this is where I am stuck */
border: 2px solid #262262;
}
<!DOCTYPE html>
<html>
<head>
<title>emoyeni</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<button class="buy-button">+</button>
<div class="navbar">
<a href="#home" class="active float-left">
<img src="img/baseline-bar-chart-24-px.svg" class="bottom-nav-icon active">
</a>
<a href="#news" class="float-left">
<img src="img/baseline-textsms-24-px.svg" class="bottom-nav-icon">
</a>
<a href="#contact" class="float-right">
<img src="img/baseline-account-balance-wallet-24-px.svg" class="bottom-nav-icon">
</a>
<a href="#contact" class="float-right">
<img src="img/baseline-notifications-24-px.svg" class="bottom-nav-icon">
</a>
</div>
</body>
</html>