I'm currently working on developing a responsive navbar. Everything seems to be functioning well in larger window sizes, but when I view it on an xs screen, the first element of the navbar does not collapse properly. For reference, here are two examples:
First example, where everything is working fine: https://i.sstatic.net/Kmu66.jpg
Now, let's take a look at the second example: https://i.sstatic.net/6hdz7.png
The issue lies in "HOME" not collapsing as expected.
I have included snippets of both the HTML and CSS code for your reference:
html {
background: url(Fondo.jpg) no-repeat center center fixed;
/*Setting background image*/
background-size: cover;
/*Covering entire screen with background image*/
overflow-y: auto;
/*Adding scrollbar when zoomed*/
font-family: Arial, Helvetica, sans-serif;
/*Setting default font type*/
}
body {
background: none !important;
margin: 0 !important;
padding: 0 !important;
}
h2 {
color: #4CAF50;
}
...
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
...
Your assistance in resolving this matter would be greatly appreciated!
Thank you for your help in advance!
Please refer to the following image for the desired outcome: