While working with Notepad++, everything functions properly. However, when using an ASP.NET web app in Visual Studio, the navigation bar displays oddly:
Even though the margin is set to 0, the nav bar protrudes out unexpectedly.
Is there a default setting in Visual Studio causing this issue?
Your insights are appreciated!
Here is the HTML and CSS code provided:
body {
margin: 0 0 55px 0;
}
.nav {
position: fixed;
bottom: 0;
width: 100%;
height: 55px;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
background-color: #ffffff;
display: flex;
overflow-x: auto;
}
.nav__link {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-grow: 1;
min-width: 50px;
overflow: hidden;
white-space: nowrap;
font-family: sans-serif;
font-size: 13px;
color: #444444;
text-decoration: none;
-webkit-tap-highlight-color: transparent;
transition: background-color 0.1s ease-in-out;
}
.nav__link:hover {
background-color: #eeeeee;
}
.nav__link--active {
color: #009578;
}
.nav__icon {
font-size: 18px;
}
<html>
<head>
<title>
Bottom Nav Bar
</title>
<meta name="viewport" content="width=device=width, initial scale=1.0" />
<meta charset="utf-8" />
<link rel="shortcut icon" href="/assets/favicon.ico">
<link href="/assets/favicon.ico" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="./css/nav.css">
</head>
<body>
<nav class="nav">
<a href="#" class="nav__link">
<i class="material-icons nav__icon">dashboard</i>
<span class="nav__text">Dashboard</span>
</a>
<a href="#" class="nav__link nav__link--active">
<i class="material-icons nav__icon">person</i>
<span class="nav__text">Profile</span>
</a>
<a href="#" class="nav__link">
<i class="material-icons nav__icon">devices</i>
<span class="nav__text">Devices</span>
</a>
<a href="#" class="nav__link">
<i class="material-icons nav__icon">lock</i>
<span class="nav__text">Privacy</span>
</a>
<a href="#" class="nav__link">
<i class="material-icons nav__icon">settings</i>
<span class="nav__text">Settings</span>
</a>
</nav>
</body>
</html>
I have included the HTML despite facing difficulties doing so previously. Can anyone pinpoint why this functionality is not working as expected?