I am encountering challenges with the frontend of my webapp. I utilized Bootstrap along with some customized CSS definitions for adjustments. While the desktop interface appears fine, there is an issue with the navbar on smartphones. When attempting to scroll through the menu on mobile devices, the buttons fail to align in the center on a single line.
To provide further clarity, I have included images depicting the current interface 1 and the desired outcome 2.
Here is the code snippet being used:
body {
background-color: black;
font-family: "Futura-CondensedExtraBold", sans-serif;
font-weight: bold;
background-image: url("wallpaper.png");
background-position: center top;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
}
.navbar{
background-color: #000b29;
width: 100%;
}
.input-field-warn{
color: orangered;
font-size: small;
}
.input-field-ok{
color: forestgreen;
font-size: small;
}
.btn-home{
border-radius: 10%;
background-color: darkgrey;
border-color: white;
border-width: medium;
font-weight: bold;
margin-left: 2%;
color: #222222;
font-size: 1.5vw;
width: 12.5vw;
height: calc(3.2vw + 10px);
overflow: hidden;
white-space: nowrap;
}
.btn-home:hover{
background-color: #525252;
}
.row-1{
margin-top: 2%;
margin-left: 10%;
text-decoration: underline;
text-underline-offset: 20%;
color: white;
}
.home-box{
background: rgba(0, 0, 0, 0.5);
margin-left: 10%;padding: 3%;
border-radius: 5%;
font-size: calc(0.7vw + 0.55vh);color: #ffffff;
border: solid white;
}
.home-box-1{
width: 35%;
margin-top: 2.5%;
}
...
@media screen and (max-width: 992px) {
#home-button-container{
justify-content: center;
overflow: hidden;
white-space: nowrap;
width: 100%;
text-align: center;
}
.btn-home{
padding: 0;
margin: 0;
font-size: 2.5vw;
overflow: hidden;
white-space: nowrap;
display: inline-block;
}
...
}
<!doctype html>
<html lang="en">
<head>
<title>WhoIsOnline</title>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a2c0cdcdd6d1d6d0c3d2e2978c938c91">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c4a6ababb0b7b0b6a5b484f1eaf5eaf7">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="index.js" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link href="indexStyle.css" rel="stylesheet">
<link rel="shortcut icon" href="icon.ico" type="image/x-icon">
</head>
<body onload="loadInfo()">
<div id="main-container">
<div id="nav-container">
<nav class="navbar py-3 navbar-expand-lg navbar-dark" id="home-navbar">
...