CSS Style Side Navbar with Icons - html

I am currently building a dashboard for a project I'm workig on - as i didn't touch css for years now i kinda struggle with a side Nav Bar.
<div id="nav">
<div id="nav-wrapper">
<ul>
<li><i class="fas fa-home"></i></li>
<li><i class="fas fa-home"></i></li>
<li><i class="fas fa-home"></i></li>
<li><i class="fas fa-home"></i></li
<li><i class="fas fa-home"></i></li>
</ul>
</div> <!--End of nav-wrapper-->
</div> <!--End of nav-->
#nav{
width: 10%;
height: 100%;
background-color: #273138;
position: fixed;
a{
color: white;
text-decoration: none;
}
#nav-wrapper{
padding: 30px 0px 30px;
font-size: 2em;
}
}
This is what my navbar basicaly looks like. I want the elements centered and rounded - similarly to the style discord uses for it's server list (Link)
Any idea how i can build this in css?

I have created a solution in JSFiddle
JSFiddle
* {
padding: 0;
margin: 0;
}
html, body {
height: 100%;
}
#nav {
width: 10%;
height: 100%;
background-color: #273138;
position: fixed;
}
#nav-wrapper {
font-size: 1.5em;
}
#nav-wrapper ul {
display: block;
}
#nav-wrapper li {
list-style: none;
background-color: #d24d57;
height: 50px;
width: 50px;
margin: 10px auto;
border-radius: 100%;
text-align: center;
line-height: 50px;
}
#nav-wrapper li a {
color: white;
text-decoration: none;
}

I have made something, does it looks like what you want?
body{
margin: 0px;
}
#nav {
height: 100%;
width: 10%;
background-color: #273138;
position: fixed;
}
#nav-wrapper{
display: flex;
justify-content: center;
align-items: center;
}
ul{
list-style-type: none;
margin: 0px;
padding: 0px;
}
li{
margin-top: 2px;
background-color: orange;
border-radius: 100%;
padding: 5px;
font-size: 2em;
}
a{
color: white;
text-decoration: none;
}
plus, this is not recommended to nest classes

I hope this can help you.
body {
background-color: #36393e;
}
#nav {
width: auto;
height: 100%;
background-color: #1f2125;
position: fixed;
}
#nav ul {
list-style: none;
padding-left: 0;
margin: 0;
position: relative;
padding-top: 20px;
padding-bottom: 20px;
}
#nav ul::before {
position: absolute;
content: '';
top: 15px;
left: 25%;
background-color: #2E3136;
width: 50%;
height: 1px;
}
#nav ul::after {
position: absolute;
content: '';
bottom: 15px;
left: 25%;
background-color: #2E3136;
width: 50%;
height: 1px;
}
#nav ul li {
display: flex;
flex-direction: column;
justify-items: center;
align-items: center;
margin: 10px;
}
#nav a {
background-color: #2E3136;
border-radius: 100%;
padding: .5em;
color: white;
text-decoration: none;
width: 30px;
height: 30px;
display: flex;
justify-content: center;
align-items: center;
}
#nav a {
animation: hover-out 0.6s ease;
}
#nav a:hover, #nav a:focus {
animation: hover-in 0.8s ease forwards;
}
#nav a i {
font-size: 1em;
}
#nav #nav-wrapper {
font-size: 2em;
}
#keyframes hover-in {
0% {
border-radius: 100%;
background-color: #2E3136;
}
40% {
border-radius: 12px;
}
70% {
border-radius: 16.7px;
}
80% {
background-color: #7289DA;
}
100% {
border-radius: 15px;
background-color: #7289DA;
}
}
#keyframes hover-out {
0% {
border-radius: 15px;
background-color: #7289DA;
}
45% {
border-radius: 70%;
background-color: #2E3136;
}
65% {
border-radius: 70%;
}
75% {
border-radius: 75%;
}
100% {
border-radius: 100%;
}
}
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div id="nav">
<div id="nav-wrapper">
<ul>
<li><i class="fa fa-home"></i></li>
<li><i class="fa fa-home"></i></li>
<li><i class="fa fa-home"></i></li>
<li><i class="fa fa-home"></i></li>
<li><i class="fa fa-home"></i></li>
</ul>
</div> <!--End of nav-wrapper-->
</div> <!--End of nav-->

Related

Fixed position html css sidebar scrolls in mobile view when not supposed to

I am currently building out my portfolio, and while working on the sidebar and testing for mobile responsivness, i ran into a small problem.
i have a div that acts as my sidebar, it has a position fixed, with a top and left 0. and in desktop view, it stays on scroll and works as i would expect. however through the inspect tab, and mobile view, the sidebar scrolls with the page. Code is attached below, in a perfect world i would be able to keep the sidebar where it is supposed to be in the mobile view. and this is specific to the mobile view, if you just shrink the main window to the media query width, it works as expected. Thanks!!
EDIT:
What iwant it to look like: https://youtu.be/w3AT3WHHL4o
what it looks like: https://youtu.be/kbfS8vBKAlU
<div class="side-nav">
<a href="#home" class="logo">
<img class="logo-img" src="Images/Logo.png">
<img class="icon-img" src="Images/Icon.png">
</a>
<ul class="nav-links">
<li><i class="fa-solid fa-user scrollLink"></i><p>About</p></li>
<li><i class="fa-solid fa-folder scrollLink"></i><p>Projects</p></li>
<li><i class="fa-solid fa-file scrollLink"></i><p>Resume</p></li>
<div class="active"></div>
</ul>
</div>
<style>
.side-nav {
width: 250px;
height: 100vh;
background: #9E9E9E;
position: fixed;
top: 0;
left: 0;
padding: 20px 30px;
}
.logo {
display: block;
margin-bottom: 130px;
}
.logo-img {
display: block;
width: 190px;
}
.icon-img {
display: none;
}
.nav-links {
list-style: none;
position: relative;
}
.nav-links li {
padding: 10px 0;
}
.nav-links li a {
color: white;
text-decoration: none;
padding: 10px 14px;
display: flex;
align-items: center;
}
.nav-links li a i {
font-size: 22px;
margin-right: 20px;
}
.active {
background: white;
width: 100%;
height: 47px;
position: absolute;
left: 0;
top: 4%;
z-index: -1;
border-radius: 6px;
box-shadow: 0 5px 10px rgba(255, 255, 255, 0.4);
display: none;
transition: top 0.5s;
}
.nav-links li:hover a {
color: #9E9E9E;
transition: 0.3s;
}
.nav-links li:hover ~ .active {
display: block;
}
.nav-links li:nth-child(1):hover ~ .active{
top: 4%;
}
.nav-links li:nth-child(2):hover ~ .active{
top: 35.9%;
}
.nav-links li:nth-child(3):hover ~ .active{
top: 69.2%;
}
#media only screen and (max-width: 600px){
.side-nav {
width: 110px;
}
.nav-links li a p {
display: none;
}
.nav-links li a i {
margin-right: 0;
}
.nav-links li a {
justify-content: center;
}
.logo-img {
display: none;
}
.icon-img {
display: block;
}
}
</style>
i have commented the things i added. i am sorry i would not be able to explain because you setup is very messy & need to refactored.
.side-nav {
width: 250px;
height: 100vh;
background: #9E9E9E;
position: fixed;
top: 0;
left: 0;
padding: 20px 30px;
}
.logo {
display: block;
margin-bottom: 130px;
}
.logo-img {
display: block;
width: 190px;
}
.icon-img {
display: none;
}
.nav-links {
list-style: none;
position: relative;
}
.nav-links li {
padding: 10px 0;
}
.nav-links li a {
color: white;
text-decoration: none;
padding: 10px 14px;
display: flex;
align-items: center;
}
.nav-links li a i {
font-size: 22px;
margin-right: 20px;
}
.active {
background: white;
width: 100%;
height: 47px;
position: absolute;
left: 0;
top: 4%;
z-index: -1;
border-radius: 6px;
box-shadow: 0 5px 10px rgba(255, 255, 255, 0.4);
display: none;
transition: top 0.5s;
}
.nav-links li:hover a {
color: #9E9E9E;
transition: 0.3s;
}
.nav-links li:hover~.active {
display: block;
}
.nav-links li:nth-child(1):hover~.active {
top: 4%;
}
.nav-links li:nth-child(2):hover~.active {
top: 35.9%;
}
.nav-links li:nth-child(3):hover~.active {
top: 69.2%;
}
#media only screen and (max-width: 600px) {
.side-nav {
width: 100px;
height: 70vh;
padding: 2px 3px; /*i added*/
display: flex; /*i added*/
flex-direction: column; /*i added*/
align-items: space-between; /*i added*/
}
.nav-links li a i {
font-size: 12px; /*i added*/
margin-right: 0px; /*i added*/
}
.logo {
display: block;
margin-bottom: 30px; /*i added*/
}
.nav-links li a p {
display: none;
}
.nav-links li a i {
margin-right: 0;
}
.nav-links li a {
justify-content: flex-start; /*i added*/
}
.logo-img {
display: none;
}
.icon-img {
display: block;
}
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" rel="stylesheet" />
<div class="side-nav">
<a href="#home" class="logo">
<img class="logo-img" src="Images/Logo.png">
<img class="icon-img" src="Images/Icon.png">
</a>
<ul class="nav-links">
<li><i class="fa-solid fa-user scrollLink"></i><p>About</p></li>
<li><i class="fa-solid fa-folder scrollLink"></i><p>Projects</p></li>
<li><i class="fa-solid fa-file scrollLink"></i><p>Resume</p></li>
<div class="active"></div>
</ul>
</div>

footer does not cover the entirety of the length of the page

This is my first time writing in html and css, so sorry if it's confusing and dumb.
I'm trying to make that sticks to the bottom and covers the length of the page, the problem is that i tried everything i could, from padding to width:100% other thant searching online, what can i do?
I'm using angular and i have installed bootstrap, please don't hesitate to ask any question or to ask me to explain myself (i'm not a native speaker), have a nice day and thank you!
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
width: 100%;
height: 100%;
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
max-width: 2270px;
margin: 0 auto;
}
.row {
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
width: 25%;
padding: 0;
}
.footer-col h4 {
font-size: 18px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px;
}
.footer-col ul li a {
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.siteFooterBar {
position: fixed;
bottom: 0;
padding-top: 10px;
width: 100%;
box-shadow: 0px 0px 25px rgb(207, 207, 207);
height: 78px;
color: #9B9B9B;
background: #F3F3F3;
}
.content {
display: block;
padding: 10px;
margin: 0px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
/*responsive*/
#media(max-width: 100%) {
.footer-col {
width: 100%;
margin-bottom: 0px;
}
}
#media(max-width: 100%) {
.footer-col {
width: 100%;
}
}
<footer class="footer">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#">
<img src="https://i.imgur.com/1yvwx9I.png">
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4>
<ul>
<li>Chi Siamo</li>
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</footer>
The standard way to align a footer at the bottom of a webpage is just by setting it to position: relative;. However, this entails that there is more content that is equal to or greater than the viewport height. Hence, aligning the footer after the content and at the bottom.
If you don't have content, use position: absolute; on footer. Then you can set bottom: 0px; to get it at the bottom. Then set left and right to 0 to get it the full width. See below.
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
width: 100%;
height: 100%;
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
max-width: 2270px;
margin: 0 auto;
}
.row {
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
/* new */
footer {
position: absolute;
bottom: 0px;
right: 0px;
left: 0px;
}
/* end new */
.footer {
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
width: 25%;
padding: 0;
}
.footer-col h4 {
font-size: 18px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px;
}
.footer-col ul li a {
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.siteFooterBar {
position: fixed;
bottom: 0;
padding-top: 10px;
width: 100%;
box-shadow: 0px 0px 25px rgb(207, 207, 207);
height: 78px;
color: #9B9B9B;
background: #F3F3F3;
}
.content {
display: block;
padding: 10px;
margin: 0px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
/*responsive*/
#media(max-width: 100%) {
.footer-col {
width: 100%;
margin-bottom: 0px;
}
}
#media(max-width: 100%) {
.footer-col {
width: 100%;
}
}
<main>
fooo
</main>
<footer class="footer">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#">
<img src="https://i.imgur.com/1yvwx9I.png">
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4>
<ul>
<li>Chi Siamo</li>
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</footer>

Hamburger icon not showing on mobile

I have a navbar on my Django application. The code for it is below.
.nav-header {
height: 75px;
width: 100%;
float: left;
background: #2e2e2e;
padding: 0 20px;
color: #fff;
margin-bottom: 25px;
border-bottom: 2px solid black;
}
.brand-logo {
max-width: 75px;
float: left;
padding: 14px 0px;
}
.brand-logo img {
max-width: 100%;
}
.navigation {
margin: 0px;
float: right;
}
.navigation li {
list-style: none;
float: left;
}
.navigation li a {
color: #fff;
padding: 28px 15px;
text-transform: uppercase;
text-align: center;
display: block;
text-decoration: none;
}
.navigation li a i {
width: 100%;
font-size: 20px;
margin-bottom: 7px;
}
.show-menu-btn,
.hide-menu-btn {
transition: 0.4s;
font-size: 30px;
cursor: pointer;
display: none;
z-index: 2;
}
.show-menu-btn {
margin: 0px;
margin-top: 15px;
float: right;
}
.show-menu-btn i {
line-height: 100px;
}
.navigation a:hover,
.show-menu-btn:hover,
.hide-menu-btn:hover {
color: #00ff0a;
}
#toggle-btn {
position: absolute;
visibility: hidden;
z-index: -1111;
}
#media screen and (max-width: 767px) {
.show-menu-btn,
.hide-menu-btn {
display: block;
}
.navigation {
position: fixed;
width: 100%;
height: 100vh;
background: #2e2e2e;
top: -100%;
left: 0;
padding: 50px 0px;
transition: 1s;
z-index: 1;
}
.navigation li {
width: 100%;
}
.navigation li a {
padding: 15px 15px;
text-align: left;
}
.navigation li a i {
width: auto;
font-size: 20px;
}
.hide-menu-btn {
position: absolute;
top: 15px;
right: 20px;
}
#toggle-btn:checked ~ nav .navigation {
top: 0px;
}
}
<div class="container">
<input type="checkbox" id="toggle-btn">
<label for="toggle-btn" class="show-menu-btn"><i class="fas fa-bars"></i></label>
<nav>
<ul class="navigation">
<li><i class="fas fa-house-damage"></i> Home</li>
{% if request.user.is_authenticated %}
<li><i class="fas fa-sign-out-alt"></i> Sign Out</li>
{% else %}
<li><i class="fas fa-sign-in-alt"></i> Sign In</li>
<li><i class="fas fa-user-plus"></i> Sign Up</li>
{% endif %}
<label for="toggle-btn" class="hide-menu-btn"><i class="fas fa-times"></i></label>
</ul>
</nav>
</div>
When I test it locally in google chrome on my PC using the device toolbar, it works completely fine. When I deploy it to my Heroku server, the hamburger icon does not show.
The label is there it just is not visible. When I try to randomly tap the screen in the area where it is supposed to be, it works but still does not show.

Div moves over other one on diferent device scales

So I have this problem, I have Static web page, and i have header section and few others.
But currently right now. Whatever section i set to be under the header section, its just move over the header.
This is first time this is happening, and i cant reslove it.
On first i tought its problem in browser, but it is same on every one that i tried.
I think it is problem in the image on header section so i placed it above the txt section on the header, but section below header stil overlaps on the header.
Soo I double checked all code on header and I think there was nothing wrong that
could cause this.
header {
margin: auto;
height: 100vh;
}
.navigation-menu {
z-index: 10000;
display: flex;
align-items: center;
background: #fff;
box-shadow: 0 1px 1px #333;
justify-content: space-between;
position: fixed;
width: 100%;
left: 0;
top: 0;
padding: 20px 20px;
}
.navigation-menu nav ul {
word-spacing: 10px;
}
.navigation-menu nav ul li {
list-style-type: none;
display: inline-block;
}
.navigation-menu nav ul li a {
font-size: 19px;
}
/*
===== Hamburger Menu =====
*/
.navigation-menu .hamburger {
padding: 5px;
position: relative;
display: none;
cursor: pointer;
right: 40px;
border: none;
background: none;
outline: none;
appearance: none;
}
.navigation-menu .hamburger .bar {
transition: .3s ease all;
position: relative;
display: block;
margin-bottom: 5px;
width: 30px;
height: 3px;
background: #333;
border-radius: 26px;
}
.hamburger.is-active .bar:nth-last-child(1) {
transform: rotate(-45deg) translate(4px, -5px);
}
.hamburger.is-active .bar:nth-last-child(2) {
transform: translateX(-10px);
opacity: 0;
}
.hamburger.is-active .bar:nth-last-child(3) {
transform: rotate(45deg) translate(6px, 8px);
}
.mobile-menu {
transition: .3s ease all;
transform: translateX(100%);
position: fixed;
display: none;
align-items: center;
justify-content: space-around;
left: 0;
top: 0;
width: 100%;
padding-top: 120px;
height: 100vh;
z-index: 2;
background: #fff;
}
.mobile-menu.menu-show {
transform: translateX(0%);
}
.mobile-menu ul {
word-spacing: 10px;
}
.mobile-menu ul li {
list-style-type: none;
}
.mobile-menu ul li a {
font-family: 'Playfair Display', serif;
margin-bottom: 5px;
transition: .3s ease all;
font-size: 45px;
}
.mobile-menu ul li a:hover {
color: red;
}
#media (max-width:533px) {
.navigation-menu nav {
display: none;
}
.navigation-menu .hamburger {
display: block;
}
.mobile-menu {
display: flex;
}
}
/*
===== Hamburger Menu =====
*/
.heading__container {
position: relative;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
height: 100vh;
}
.heading__content {
position: relative;
margin: 6%;
display: block;
}
.heading__title h1{
font-weight: 900;
text-transform: uppercase;
font-size: 55px;
}
.heading__title h1 span {
color: red;
}
.heading__subtitle p{
font-size: 22px;
}
.heading__subtitle {
max-width: 600px;
width: 100%;
}
.heading__image {
padding: 1em;
position: relative;
text-align: center;
}
.heading__image img {
max-width: 400px;
width: 100%;
}
.heading__button-box .btn__read {
background: red;
border: solid 1px red;
}
.heading__button-box .btn__read a {
color: #fff;
}
.heading__button-box .btn__react {
position: relative;
}
.heading__button-box .btn__react::before {
position: absolute;
content: '';
left: 0;
bottom: 0;
background: red;
z-index: -1;
height: 0;
transition: .3s ease all;
width: 100%;
}
.heading__button-box .btn__react:hover::before {
height: 100%;
}
.heading__button-box button {
margin-bottom: 1%;
margin-right: 5%;
}
.heading__button-box .btn__react a {
transition: .3s ease all;
}
.heading__button-box .btn__react:hover {
border: solid 1px red;
}
.heading__button-box .btn__react:hover a {
color: #fff;
}
.heading__button-box .btn__react {
border: solid 1px red;
}
.h__wrapper {
margin-top: 50px;
}
.h__wrapper .h__button {
display: inline-block;
overflow: hidden;
height: 60px;
width: 60px;
float: left;
border-radius: 50px;
cursor: pointer;
margin: 10px 5px;
transition: .3s ease all;
box-shadow: 0 2px 12px #333;
}
.h__wrapper .h__button:hover {
width: 200px;
}
.h__wrapper .h__button .icon {
height: 60px;
width: 60px;
transition: .3s ease all;
border-radius: 50px;
text-align: center;
line-height: 60px;
box-sizing: border-box;
display: inline-block;
}
.h__wrapper .h__button .icon i {
font-size: 25px;
line-height: 60px;
}
.h__wrapper .h__button span {
font-size: 20px;
line-height: 60px;
margin-left: 10px;
font-weight: 500;
}
.h__wrapper .h__button:nth-child(1) .icon {
background: #fff;
}
.h__wrapper .h__button:nth-child(1):hover .icon {
background: rgb(126, 168, 245);
}
.h__wrapper .h__button:nth-child(1):hover .icon i{
color: #fff;
}
.h__wrapper .h__button:nth-child(2) .icon {
background: #fff;
}
.h__wrapper .h__button:nth-child(2):hover .icon {
background: rgb(214, 146, 20);
}
.h__wrapper .h__button:nth-child(2):hover .icon i{
color: #fff;
}
.h__wrapper .h__button:nth-child(3) .icon {
background: #fff;
}
.h__wrapper .h__button:nth-child(3):hover .icon {
background: #333;
}
.h__wrapper .h__button:nth-child(3):hover .icon i{
color: #fff;
}
<header>
<div class="navigation-menu">
<img src="../assets/images/logo/Anima.png" alt="">
<nav>
<ul>
<li>Home</li>
<li>Services</li>
<li>About</li>
<li>Works</li>
<li>Projects</li>
</ul>
</nav>
<div class="hamburger">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</div>
<nav class="mobile-menu">
<ul>
<li>Home</li>
<li>About</li>
<li>Services</li>
<li>Works</li>
<li>Projects</li>
</ul>
</nav>
<section class="heading__container">
<div class="heading__content">
<div class="heading__title">
<h1><span>Emanuel</span> <br> Rajic</h1>
</div>
<div class="heading__subtitle">
<p>I am 16 years old Front-end developer and CS Student</p>
</div>
<div class="heading__button-box">
<button class="btn__read">Read More</button>
<button class="btn__contact btn__react">Get In Touch</button>
</div>
<div class="h__wrapper">
<div class="h__button">
<div class="icon"><i class="fab fa-twitter"></i></div>
<span>Twitter</span>
</div>
<div class="h__button">
<div class="icon"><i class="fab fa-instagram"></i></div>
<span>Instagram</span>
</div>
<div class="h__button">
<div class="icon"><i class="fab fa-github"></i></div>
<span>Github</span>
</div>
</div>
</div>
<div class="heading__image">
<img src="../assets/images/header/valentin-salja-0aX51h4WvAk-unsplash.jpg">
</div>
</section>
</header>
A combination of z-index:10000, which will give this element priority over everything (so being on top all the time), and position:fixed, which will make that element have a fixed position in the said place no matter the scrolling are, the culprits. Removing those two CSS properties would fix your "issue".

Why is my drop down menu not Working on HTML,CSS

I have no idea why my drop down menu that im trying to include is not appearing and i cant seem to find whats wrong, i saw that the only way for it to appear is to remove hidden but if i do that i doesnt look how i want it to, yet if i have the hidden when i hover over the servicios tab its not showing anything which i cannot find the reason on why it doesnt appear there
{
margin: 0;
padding: 0;
font-family: sans-serif;
}
.hero{
height: 100vh;
background-image: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.6)), url(bp.jpg);
background-position: center;
background-size: cover;
overflow-x: hidden;
position: relative;
}
.nav_bar{
display: flex;
padding: 40px 120px;
}
.nav-logo img{
width: 135px;
}
.nav_links{
flex: 1;
}
.nav_links ul{
margin-left: 50px;
display: inline;
list-style: none;
}
.nav_links ul li{
list-style: none;
display: inline-block;
padding: 8px 25px;
}
.nav_links ul a{
color: #fff;
text-decoration: none;
font-size: 18px;
}
.nav_links ul li::after{
content: '';
width: 0;
height: 2px;
background: red;
display: block;
margin: auto;
transition: 0.45s;
}
.nav_links ul li:hover::after{
width: 100%;
}
.btn{
padding: 10px 10px;
border: 0;
background: red;
font-weight: bold;
cursor: pointer;
}
.nav_links .btn{
float: center;
}
.frase{
margin: 100px 130px;
color: #fff;
}
.frase h1{
font-size: 56px;
margin-bottom: 30px;
}
.vertical_bar{
height: 100%;
background: red;
top: 0;
left: 0;
position: absolute;
}
.icono_busqueda{
height: 60%;
width: 80px;
}
.icono_busqueda .fa{
margin: 45px 23px;
display: block;
color: white;
font-size: 30px;
cursor: pointer;
}
.iconos_sociales{
height: 60%;
width: 80px;
}
.iconos_sociales .fa{
margin: 45px 23px;
display: block;
color:black;
font-size: 30px;
cursor: pointer;
}
.iconos_sociales{
height: 35%;
width: 80px;
background: white;
text-align: center;
padding-top: 27%;
bottom: 0;
position: absolute;
}
.iconos_sociales .fa{
margin: 15px 15px;
display: block;
padding: 8px;
border: 1px solid black;
border-radius: 0;
cursor: pointer;
}
*{
margin: 0;
padding: 0;
}
.sub_menu_ser
{
display: none;
}
.nav_links ul li:hover .sub_menu_ser
{
display: block;
position: absolute;
background: red;
margin-top: 15px;
margin-left: -15px;
}
.nav_links ul li:hover .sub_menu_ser ul
{
display: block;
margin: 10px;
}
.nav_links ul li:hover .sub_menu_ser li
{
width: 150px;
padding: 10px;
border-bottom: 1px dotted white;
background: transparent;
border-radius: 0;
text-align: left;
}
:last-child
{
border-bottom: none;
}
.nav_links ul li:hover .sub_menu_ser ul li a:hover
{
color: red;
}
<html>
<head>
<title> Animal Care</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="hero">
<div class="nav_bar">
<div class="nav_logo">
<img src="logo.png">
</div>
<div class="nav_links">
<ul>
<li>Sobre Nosotros</li>
<li>Servicios</li>
<div class="sub_menu_ser">
<ul>
<li>Peluqueria</li>
<li>Veterinario</li>
<li>Cirugia</li>
<li>Limpieza</li>
</ul>
</div>
<li>Contacto</li>
</ul>
<button type="button" class="btn">Registrarse</button>
</div>
<div class="frase">
<h1>Cuidando a Nuestros <br> Mas Queridos</h1>
<button type="button" class="btn">Explorar</button>
</div>
<div class="vertical_bar">
<div class="icono_busqueda">
<i class="fa fa-search"></i>
<i class="fa fa-list"></i>
</div>
<div class="iconos_sociales">
<i class="fa fa-facebook"></i>
<i class="fa fa-instagram"></i>
<i class="fa fa-twitter"></i>
<i class="fa fa-envelope-o"></i>
</div>
</div>
</div>
</body>
</html>
Code to hide the element:
#element {
display: none;
}
Code to show the element:
#element:hover {
display: block;
}