I am trying to style the header and footer of my website, which is built using a SAAS CMS. Unfortunately, I am unable to change the HTML structure, but I can add custom CSS. My goal is to create curved headers and footers with upward and downward curves. Is it possible to achieve this effect using just CSS? I have attempted using border-radius, but it only seems to work for perfect circles, not irregular shapes.
To demonstrate what I mean, I have created a codeply here.
Here is the HTML code snippet using Bootstrap:
.navbar-top {
background-color: blue;
}
.navbar-bottom {
background-color: red;
}
<!-- bootstrap nav -->
<nav class="navbar navbar-top navbar-expand-md">
<a class="navbar-brand" href="#">Brand</a>
<ul class="navbar-nav">
<li class="nav-item"><a href="#" class="nav-link">Home</a></li>
<li class="nav-item"><a href="#" class="nav-link">Link</a></li>
<li class="nav-item"><a href="#" class="nav-link">Link</a></li>
<li class="nav-item"><a href="#" class="nav-link">More</a></li>
<li class="nav-item"><a href="#" class="nav-link">Options</a></li>
</ul>
</nav>
<div class="container">
<div class="main-content">
<p>main elements are here</p>
<!-- main elements go here-->
</div>
</div>
<!-- /bootstrap nav -->
<nav class="navbar navbar-bottom navbar-expand-md fixed-bottom">
<a class="navbar-brand" href="#">Brand</a>
<ul class="navbar-nav">
<li class="nav-item"><a href="#" class="nav-link">Home</a></li>
<li class="nav-item"><a href="#" class="nav-link">Link</a></li>
<li class="nav-item"><a href="#" class="nav-link">Link</a></li>
<li class="nav-item"><a href="#" class="nav-link">More</a></li>
<li class="nav-item"><a href="#" class="nav-link">Options</a></li>
</ul>
</nav>