Why am I getting a parse error on my css? - css

W3 is giving me a parse error on line 314 of my css. I will paste the error and then my CSS below. Line 314 is the very last line. Visual studio code is also giving me a red line on line 315 that has nothing, its say
} expectedcss(css-rcurlyexpected)
Even when I add it, it is still not valid.
URI : style.css
314 Parse Error
314 Parse Error
314 Parse Error
CSS
/* #### navbar #### */
.navbar{
position: fixed;
z-index: 999;
top: 0;
left: 0;
background: var(--nero);
width: 100%;
}
.brand-and-toggler{
display: flex;
justify-content: space-between;
padding: 1rem 0;
}
.navbar-brand{
text-transform: uppercase;
font-family: var(--poppins);
font-size: 1.7rem;
font-weight: 800;
}
.navbar-toggler{
border: none;
font-size: 1.7rem;
background: none;
color: #fff;
cursor: pointer;
outline: none;
transition: var(--transition);
}
.navbar-toggler:hover{
opacity: 0.8;
}
.navbar-collapse{
height: 0;
overflow: hidden;
transition: var(--transition);
}
.nav-item{
text-align: center;
padding: 0.6rem;
position: relative;
}
.nav-item::after{
content: "";
position: absolute;
bottom: 4px;
left: 50%;
transform: translateX(-50%);
border-radius: 5px;
width: 0;
height: 2px;
background: var(--green);
transition: var(--transition);
}
.nav-item:hover::after{
width: 100px;
}
.nav-link{
text-transform: uppercase;
font-size: 1.2rem;
transition: var(--transition);
}
.nav-link:hover{
color: var(--green);
}
.nav-active .nav-link{
color: var(--green);
}
/*** show nav class ***/
.showNav{
height: 385px;
}
/* #### HOME PAGE #### */
.home{
padding: 5rem 0 2.5rem 0;
}
.home .row > div{
height: 60vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 2px solid var(--nero);
border-radius: 10px;
margin: 2rem 0;
}
.home .row-left{
text-align: center;
}
.home .row-left h3{
color: var(--green);
font-weight: 400;
text-transform: uppercase;
}
.home .row-left h1{
font-size: 2rem;
font-family: var(--poppins);
text-transform: capitalize;
line-height: 1.2;
font-weight: 900;
}
.home .row-left h1 span{
color: var(--green);
}
.home .row-left h2{
text-transform: uppercase;
font-family: var(--poppins);
font-size: 1rem;
}
.home-pg-btn{
display: flex;
margin: 1rem 0;
}
.home-pg-btn button{
padding: 0.8rem;
margin-right: 0.6rem;
border: 1px solid #f7f7f7;
}
.home-pg-btn button:first-child{
border-color: var(--green);
}
.home-pg-btn button:last-child{
background: transparent;
color: #fff;
}
.home .img-container{
position: relative;
width: 240px;
height: 240px;
border-radius: 50%;
overflow: hidden;
}
.home .img-border{
background: var(--nero);
width: 245px;
height: 245px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
/* #### footer #### */
.footer{
padding: 2.5rem 0;
border-top: 1.5px solid #252525;
}
.footer-title{
text-transform: capitalize;
font-size: 1.3rem;
font-family: var(--poppins);
font-weight: 700;
}
.footer .col{
text-align: center;
padding: 1rem 0;
}
.footer .col:first-child .text{
width: 80%;
margin: 0 auto;
}
.social-links{
display: flex;
justify-content: center;
}
.social-links a{
background: var(--nero);
width: 50px;
height: 50px;
font-size: 1.5rem;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
margin: 1.5rem 0.5rem;
transition: var(--transition);
}
.social-links a:hover{
background: var(--green);
}
.footer-links a{
display: block;
text-transform: capitalize;
padding: 0.2rem 0;
transition: var(--transition);
}
.footer-links a .fas{
display: none;
}
.footer-links a:hover{
color: #fff;
}
.footer .col:last-child div{
padding: 0.2rem 0;
}
.footer .col:last-child .fas{
padding-right: 0.5rem;
}
.footer-text .text{
text-align: center;
}
/* #### Media Queries #### */
#media screen and (min-width: 500px){
/* home page */
.home .row-left h1{
font-size: 4rem;
}
.home .row-left h2{
font-size: 1.4rem;
}
.home-pg-btn button{
padding: 1rem 1.5rem;
}
.home .img-container{
width: 320px;
height: 320px;
}
.home .img-border{
width: 325px;
height: 325px;
}
}
#media screen and (min-width: 768px){
/* footer */
.footer .row{
display: grid;
grid-template-columns: repeat(2, 1fr);
}
#media screen and (min-width: 992px){
/* navbar section */
.navbar-toggler{
display: none;
}
.navbar .container{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
}
.navbar-nav{
display: flex;
justify-content: flex-end;
}
.navbar-collapse{
height: 100%;
flex: 1 0 auto;
}
.brand-and-toggler{
flex: 0 0 100px;
}
.nav-item{
margin: 0 0.5rem;
}
.nav-link{
font-size: 1rem;
}
/* home page */
.home .row{
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 2rem;
}
.home .row > div{
height: calc(100vh - 73px);
border: none;
margin: 0;
align-items: flex-start;
}
.home .row-left{
text-align: left;
}
.home .img-container{
width: 100%;
height: 100%;
border-radius: unset;
}
.home .img-border{
height: 90%;
width: 100%;
transition: var(--transition);
border-radius: unset;
background: transparent;
}
.home .img-border:hover{
transform: translateY(-14px);
}
#media screen and (min-width: 1200px){
/* footer */
.footer .row{
grid-template-columns: repeat(4, 1fr);
}
.footer .row .col{
text-align: left;
}
.footer .col:first-child .text{
margin: 0;
}
.social-links{
justify-content: flex-start;
}
.footer-links a .fas{
display: inline-block;
}
Thanks in advance for any and all help!

you forgot 3 closing brakets. One for each media query , paste this code and compare
/* #### navbar #### */
.navbar {
position: fixed;
z-index: 999;
top: 0;
left: 0;
background: var(--nero);
width: 100%;
}
.brand-and-toggler {
display: flex;
justify-content: space-between;
padding: 1rem 0;
}
.navbar-brand {
text-transform: uppercase;
font-family: var(--poppins);
font-size: 1.7rem;
font-weight: 800;
}
.navbar-toggler {
border: none;
font-size: 1.7rem;
background: none;
color: #FFFFFF;
cursor: pointer;
outline: none;
transition: var(--transition);
}
.navbar-toggler:hover {
opacity: 0.8;
}
.navbar-collapse {
height: 0;
overflow: hidden;
transition: var(--transition);
}
.nav-item {
text-align: center;
padding: 0.6rem;
position: relative;
}
.nav-item::after {
content: "";
position: absolute;
bottom: 4px;
left: 50%;
transform: translateX(-50%);
border-radius: 5px;
width: 0;
height: 2px;
background: var(--green);
transition: var(--transition);
}
.nav-item:hover::after {
width: 100px;
}
.nav-link {
text-transform: uppercase;
font-size: 1.2rem;
transition: var(--transition);
}
.nav-link:hover {
color: var(--green);
}
.nav-active .nav-link {
color: var(--green);
}
/*** show nav class ***/
.showNav {
height: 385px;
}
/* #### HOME PAGE #### */
.home {
padding: 5rem 0 2.5rem 0;
}
.home .row > div {
height: 60vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 2px solid var(--nero);
border-radius: 10px;
margin: 2rem 0;
}
.home .row-left {
text-align: center;
}
.home .row-left h3 {
color: var(--green);
font-weight: 400;
text-transform: uppercase;
}
.home .row-left h1 {
font-size: 2rem;
font-family: var(--poppins);
text-transform: capitalize;
line-height: 1.2;
font-weight: 900;
}
.home .row-left h1 span {
color: var(--green);
}
.home .row-left h2 {
text-transform: uppercase;
font-family: var(--poppins);
font-size: 1rem;
}
.home-pg-btn {
display: flex;
margin: 1rem 0;
}
.home-pg-btn button {
padding: 0.8rem;
margin-right: 0.6rem;
border: 1px solid #F7F7F7;
}
.home-pg-btn button:first-child {
border-color: var(--green);
}
.home-pg-btn button:last-child {
background: transparent;
color: #FFFFFF;
}
.home .img-container {
position: relative;
width: 240px;
height: 240px;
border-radius: 50%;
overflow: hidden;
}
.home .img-border {
background: var(--nero);
width: 245px;
height: 245px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
/* #### footer #### */
.footer {
padding: 2.5rem 0;
border-top: 1.5px solid #252525;
}
.footer-title {
text-transform: capitalize;
font-size: 1.3rem;
font-family: var(--poppins);
font-weight: 700;
}
.footer .col {
text-align: center;
padding: 1rem 0;
}
.footer .col:first-child .text {
width: 80%;
margin: 0 auto;
}
.social-links {
display: flex;
justify-content: center;
}
.social-links a {
background: var(--nero);
width: 50px;
height: 50px;
font-size: 1.5rem;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
margin: 1.5rem 0.5rem;
transition: var(--transition);
}
.social-links a:hover {
background: var(--green);
}
.footer-links a {
display: block;
text-transform: capitalize;
padding: 0.2rem 0;
transition: var(--transition);
}
.footer-links a .fas {
display: none;
}
.footer-links a:hover {
color: #FFFFFF;
}
.footer .col:last-child div {
padding: 0.2rem 0;
}
.footer .col:last-child .fas {
padding-right: 0.5rem;
}
.footer-text .text {
text-align: center;
}
/* #### Media Queries #### */
#media screen and (min-width: 500px) {
/* home page */
.home .row-left h1 {
font-size: 4rem;
}
.home .row-left h2 {
font-size: 1.4rem;
}
.home-pg-btn button {
padding: 1rem 1.5rem;
}
.home .img-container {
width: 320px;
height: 320px;
}
.home .img-border {
width: 325px;
height: 325px;
}
}
#media screen and (min-width: 768px) {
/* footer */
.footer .row {
display: grid;
grid-template-columns: repeat(2, 1fr);
}
}
#media screen and (min-width: 992px) {
/* navbar section */
.navbar-toggler {
display: none;
}
.navbar .container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
}
.navbar-nav {
display: flex;
justify-content: flex-end;
}
.navbar-collapse {
height: 100%;
flex: 1 0 auto;
}
.brand-and-toggler {
flex: 0 0 100px;
}
.nav-item {
margin: 0 0.5rem;
}
.nav-link {
font-size: 1rem;
}
/* home page */
.home .row {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 2rem;
}
.home .row > div {
height: calc(100vh - 73px);
border: none;
margin: 0;
align-items: flex-start;
}
.home .row-left {
text-align: left;
}
.home .img-container {
width: 100%;
height: 100%;
border-radius: unset;
}
.home .img-border {
height: 90%;
width: 100%;
transition: var(--transition);
border-radius: unset;
background: transparent;
}
.home .img-border:hover {
transform: translateY(-14px);
}
}
#media screen and (min-width: 1200px) {
/* footer */
.footer .row {
grid-template-columns: repeat(4, 1fr);
}
.footer .row .col {
text-align: left;
}
.footer .col:first-child .text {
margin: 0;
}
.social-links {
justify-content: flex-start;
}
.footer-links a .fas {
display: inline-block;
}
}

You are missing an end bracket on your mediaquery right at
#media screen and (min-width: 1200px) {
section, after this
.footer-links a .fas {
display: inline-block;
}

Related

How to make border responsive?

I finally got my first webpage finished, and got it to look good on both desktop and mobile. But on medium-screens like tablets, it does not look quite right.
I've tried fiddling with the #Media Queries, men I dont quite get it.
The border does not fill the part of the screen I want. What am I missing here?
Thanks!
Code:
https://codepen.io/Ludvigx86/pen/bGjpBmK
body {
background-image: url(/Images/polkabkg.png);
background-size: cover;
border: 2ew solid aliceblue;
font-family: Geneva, Tahoma, sans-serif;
letter-spacing: 5px;
margin: 60px 250px 100px 250px;
}
.navbar {
display: flex;
justify-content: center;
list-style-type: none;
margin: 10px;
}
.navbar a {
color: aliceblue;
display: flex;
font-size: larger;
padding: 15px;
text-decoration: none;
}
.navbar a:hover {
color: rgb(200, 0, 150);
transition: 0.3s;
}
.house img {
width: 30px;
}
.house {
margin-left: 211px;
margin-top: 44px;
position: absolute;
}
.bord img {
display: block;
margin-left: auto;
margin-right: auto;
padding-bottom: 30px;
padding-top: 50px;
width: 70%;
}
.hvem p {
font-size: large;
line-height: 40px;
text-align: center;
}
.container ul {
color: aliceblue;
display: flex;
list-style: none;
text-align: center;
}
li {
padding: 30px;
}
ul .kontakt a {
color: gold;
}
.logo {
display: flex;
margin-bottom: 20px;
margin-left: auto;
margin-right: auto;
width: 50vh;
}
.band {
display: flex;
margin-bottom: 50px;
margin-left: auto;
margin-right: auto;
margin-top: 40px;
width: 80%;
}
.mail {
display: none;
justify-content: center;
border: solid 1px gold;
border-width: 2px;
border-radius: 10px;
padding: 10px;
margin-left: 40px;
margin-right: 40px;
}
.mail a {
text-decoration: none;
color: gold;
}
h3 {
color: aliceblue;
text-align: center;
}
.private {
border: dotted;
border-color: aliceblue;
margin-left: 250px;
margin-right: 250px;
margin-top: 100px;
}
h2 {
color: aliceblue;
font-style: italic;
margin: 50px;
text-align: center;
}
.konsert p {
color: #f0f8ff;
margin: 300px;
text-align: center;
}
.sitat p {
padding-right: 175px;
text-align: right;
}
p {
text-align: center;
color: #f0f8ff;
}
hr {
border-width: 2px;
}
footer {
padding: 0px;
color: #f0f8ff;
}
.container {
display: flex;
justify-content: center;
padding-bottom: 0px;
}
footer img {
display: flex;
justify-content: center;
padding: 15px;
width: 30px;
}
.header {
text-align: center;
}
.burger {
position: absolute;
top: 0.75rem;
right: 1rem;
display: none;
flex-direction: column;
justify-content: space-between;
width: 31px;
height: 21px;
}
.burger .bar {
height: 3px;
width: 100%;
background-color: aliceblue;
border-radius: 10px;
}
/* MEDIA QUERIES */
#media screen and (max-width: 768px) {
body {
background-image: url(/Images/polkabkg.png);
background-size: cover;
font-family: Geneva, Tahoma, sans-serif;
letter-spacing: 5px;
}
.house {
position: absolute;
margin: 0px;
}
.house {
position: absolute;
margin-top: 28px;
margin-left: 18px;
}
.house img {
width: 15px;
}
.navbar {
display: flex;
list-style-type: none;
margin: 0px;
padding-top: 5px;
}
.navbar a {
color: aliceblue;
display: flex;
font-size: smaller;
text-decoration: none;
}
.kontakt {
display: none;
}
ul .navbar {
padding: 0px;
}
li {
padding: 10px;
margin-bottom: 15px;
}
.logo {
width: 180px;
margin-top: 10px;
}
body > div:nth-child(3) > h2 {
margin: 0px;
font-size: small;
}
.sitat p {
padding-right: 15px;
text-align: right;
}
body {
border: 0px;
margin: 0px;
}
.navbar {
display: flex;
}
.mail {
display: flex;
justify-content: center;
border: solid 1px gold;
border-width: 2px;
border-radius: 10px;
padding: 10px;
margin-left: 40px;
margin-right: 40px;
}
.bord img {
width: 400px;
margin-top: 0px;
}
.hvem p {
font-size: smaller;
margin-left: 15px;
}
.container ul {
color: aliceblue;
display: block;
}
.private {
display: flex;
border: dotted;
border-color: aliceblue;
margin-top: 50px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
.konsert p {
display: flex;
margin: 80px;
}
}
#media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
body {
background-image: url(/Images/polkabkg.png);
background-size: cover;
border: 2px solid aliceblue;
font-family: Geneva, Tahoma, sans-serif;
letter-spacing: 5px;
margin: 60px 250px 100px 250px;
}
.house {
position: absolute;
margin: 0px;
}
.house {
position: absolute;
margin-top: 28px;
margin-left: 18px;
}
.house img {
width: 15px;
}
.navbar {
display: flex;
list-style-type: none;
margin: 0px;
padding-top: 5px;
}
.navbar a {
color: aliceblue;
display: flex;
font-size: smaller;
text-decoration: none;
}
.kontakt {
display: none;
}
ul .navbar {
padding: 0px;
}
li {
padding: 10px;
margin-bottom: 15px;
}
.logo {
width: 180px;
margin-top: 10px;
}
body > div:nth-child(3) > h2 {
margin: 0px;
font-size: small;
}
.sitat p {
padding-right: 15px;
text-align: right;
}
body {
border: 0px;
margin: 0px;
}
.navbar {
display: flex;
}
.mail {
display: flex;
justify-content: center;
border: solid 1px gold;
border-width: 2px;
border-radius: 10px;
padding: 10px;
margin-left: 40px;
margin-right: 40px;
}
.bord img {
width: 400px;
margin-top: 0px;
}
.hvem p {
font-size: smaller;
margin-left: 15px;
}
.container ul {
color: aliceblue;
display: block;
}
.private {
display: flex;
border: dotted;
border-color: aliceblue;
margin-top: 50px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
.konsert p {
display: flex;
margin: 80px;
}
}
I've tried fiddling with the #Media Queries, men I dont quite get it.
The border should surround both the content and the navbar.

Mkdocs with material theme: extra css not working on mobile devices

I'm using Mkdocs with material theme for products documentation on my company. I'd made some customize on the original theme using the extra.css file.
When people navigate on my site on web browser it's working ok.
When they navigate on mobile devices, the extra.css is not working, or having a very strange behavior.
On the images of mobile devices, the left side is when I open the menu. The right side is when I click in a link in the menu.
Here is my extra.css file.
.md-header__button.md-logo :-webkit-any(img,svg) {
display: block;
width: auto;
height: 2rem;
fill: currentColor;
}
.md-nav--primary {
font-size: .75rem;
line-height: 1.5;
background-color: #0000cc;
border-color: #eee;
border-width: thin;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
padding-top: .6rem;
padding-bottom: .6rem;
}
.md-header {
background-color: #0000cc;
}
input.md-search__input {
width: 100%;
height: 1.8rem;
padding-left: 2.2rem;
font-size: .8rem;
opacity: 1;
background-color: rgba(0,0,0,1);
border-radius: 16px;
text-align: left;
letter-spacing: 0px;
color: #ffffff;
opacity: 1;
}
.md-search__input:hover {
background-color: rgba(0,0,0,1);
}
.md-search-result__teaser {
display: -webkit-box;
max-height: 2rem;
color: #00348b;
margin: .5em 0;
overflow: hidden;
font-size: .64rem;
line-height: 1.6;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
[data-md-toggle=search]:checked~.md-header .md-search__input {
text-overflow: clip;
background-color: var(--md-default-bg-color);
border-radius: .1rem .1rem 0 0;
color: #00348b;
}
.md-search-result__meta {
padding: 0 .8rem;
color: #00348b;
font-size: .64rem;
line-height: 1.8rem;
scroll-snap-align: start;
}
.md-nav--primary, .md-nav--secondary {
font-size: .75rem;
line-height: 1.5;
background-color: #eee;
-moz-border-radius: 8px;
border-radius: 8px;
padding-top: .6rem;
padding-bottom: .6rem;
background: #00348B 0% 0% no-repeat padding-box;
}
.md-nav__title {
display: block;
padding: 0 .6rem;
overflow: hidden;
font-weight: 700;
text-overflow: ellipsis;
color: #ffffff;
}
.md-nav__item .md-nav__link--active {
text-align: left;
font: normal normal normal 14px/18px Open Sans;
letter-spacing: 0.35px;
color: #FFFFFF;
opacity: 1;
}
.md-nav__item--nested>.md-nav__link {
color: #FFFFFF;
}
.md-nav__link {
display: block;
margin-top: .625em;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
transition: color 125ms;
scroll-snap-align: start;
text-align: left;
letter-spacing: 0.33px;
color: #FFFFFF;
opacity: 1;
}
.md-nav__link[data-md-state=blur] {
color: #d5d5d5;
}
.md-footer {
color: #FFFFFF;
background : #00348B 0% 0% no-repeat padding-box;
}
.md-float-right {
height: 100%;
margin: 430px 0 0 650px;
display: inline-block;
align-items: flex-end;
position: fixed;
}
p {
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
text-align: justify;
}

how do I make it so my mobile responsive works on my web page?

I am trying to make my page mobile responsive but something is off. I had to change position of my nav-menu from absolute to relative for nav menu to go to the right top corner but now im having issues with the responsive part as well as the collapse of menu. i have been in tutorial hell trying to understand relative and absolute. I thought I had it but this proves i do not
/* make for mobile*/
.mobile-nav-toggle {
position: fixed;
right: 15px;
top: 15px;
z-index: 9998;
border: 0;
background: none;
font-size: 24px;
transition: all 0.4s;
outline: none !important;
line-height: 1;
cursor: pointer;
text-align: right;
}
.mobile-nav-toggle i {
color: #ffff;
}
.mobile.nav {
position: fixed;
top: 55px;
right: 15px;
bottom: 15px;
z-index: 0;
overflow-y: auto;
background: rgba(0,0,0,0.7);
}
The rest of the script :
body {
font-family: "open sans",sans-serif;
background-color: #040404;
color: #fff;
position: relative;
background: transparent;
}
body::before {
content: "";
position: fixed;
background: #040404;
left: 0;
background-size: cover;
right: 0;
top: 0;
height: 100vh;
z-index: -1;
}
#media (min-width: 1024px){
body::before {
background-attachment: fixed;
}
}
a {
color: #18d26e;
}
a:hover {
color: #18d26e;
text-decoration: none;
}
h1,h2,h3,h4,h5,h6 {
font-family: "Railewa", sans-serif;
}
/*==========Header=======*/
#header {
transition: ease-in-out 0.3s;
position: relative;
height: 100vh;
display: flex;
align-items: center;
z-index: 997;
overflow-y: auto;
}
#header * {
transition: ease-in-out 0.3s;
}
#header h1 {
font-size: 48px;
margin: 0;
padding: 0;
line-height: 1;
font-weight: 700;
font-family: "poppins",sans-serif;
}
#header h1 a,
#header h1 a:hover {
color: #fff;
line-height: 1;
display: inline-block;
}
header h2 {
font-size: 24px;
margin-top: 20px;
color: rgba(255,255,255,0.8);
}
#header h2 span {
color: #fff;
border-bottom: 2px solid #18d26e;
padding-bottom: 6px;
}
#header h2 span:hover {
color: #ffff;
border-bottom: 2px solid #ff28f4;
padding-bottom: 6px;
}
#header .social-links {
margin-top: 40px;
display: flex;
}
#header .social-links a {
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255,0.1);
color: #ffff;
line-height: 1;
margin-right: 8px;
border-radius: 50%;
width: 40px;
height: 40px;
}
#header .social-links a:hover {
background: #18d26e;
}
/*make it resposive*/
#media (max-width:992px) {
#header h1 {
font-size: 36px;
}
#header h2 {
font-size: 20px;
line-height: 30px;
}
#header .social-links {
margin-top: 15px;
}
#header .container {
display: flex;
flex-direction: column;
align-items: center;
}
}

Screen Width Query working incorrectly with SCSS and Create React App

I am using SASS 5.0.0 with Create React App on an .scss file and the Navbar is always hidden.
The Screen Width Query is working incorrectly.
I am trying to make a different Navbar for Mobile. It is not fully made yet. Only the hiding of it.
App.scss:
#import "_var.scss";
.logo {
width: 100px;
height: 100px;
padding-left: 10%;
padding-bottom: 0px;
}
body {
font-size: 28px;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: $mainWhite;
position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;
text-align: center;
display: flex
}
li {
float: left;
}
#media screen and (min-width: 480px) {
li a {
border-style: solid;
border-radius: 5%;
margin: 2px;
margin-bottom: 0px;
display: block;
color: black;
text-align: center;
padding: 6px 10px;
text-decoration: none;
.nbd {
visibility: visible;
}
}
}
.nbd {
visibility: hidden;
}
li a {
}
.center {
display: flex;
justify-content: center;
align-items: center;
}
li a:hover {
background-color: $mainWhite;
}
.active {
background-color: $mainWhite;
}
.title {
font-size: 40px;
background-color: $mainBlack;
margin: 6px 0;
margin-bottom: 0;
padding: 20px;
color: $mainWhite;
}
.f {
display: flex;
overflow-x: hidden;
flex-wrap: wrap;
}
.img {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
padding: 5px;
}
/*Images*/
.imgSize1 {
height: 50px;
width: 50px;
}
.imgSize2 {
height: 75px;
width: 75px;
}
.imgSize3 {
height: 125px;
width: 125px;
}
/*Images*/
.grey {
background-color: lighten($mainBlack, 15%);
}
_var.scss:
$mainWhite: #fff;
$mainBlack: #000;

Issue with Ghost theme at my work website - sidebar is not mobile responsive

I've been ask at work to fix an issue with our website.I didn't created it so I have to understand what cause this bug but some help will be appreciate.
In Screen PC, the website is working fine ; on mobile when you click to open the sidebar, you click on Services, the submenu opens fine :
But when you click below on Industries, this it what appears :
I download the theme installed on Ghost and check the css file, I think there and issue with bootstrap but I'm not sure...
If someone can give me some tips or idea - Let me know if should put some code here of this portion.
Thank you
enter code here
/*------INDUSTRIES-SUBMENU------*/
#content-desktop {display: block;}
#content-mobile {display: none;}
#media screen and (max-width: 768px) {
#industries-submenu ul{
padding: 0;
margin: 20px 0 40px 0;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: flex-start;
position: relative;
}
#industries-submenu ul li{
width: 25%;
margin-top: 20px;
padding-right: 30px;
}
#content-desktop {display: none;}
#content-mobile {display: block;}
#industries-submenu ul li a{
color: #1a2c47;
font-size: 16px;
font-weight: 700;
}
#industries-submenu ul li ul{
margin: 10px 0 0 0;
}
#industries-submenu ul li ul li{
margin-bottom: 10px;
width: 100%;
margin-top: 0;
}
#industries-submenu ul li ul li a{
color: #4f5661;
font-size: 14px;
font-weight: 600;
}
}
/*===== 2. INDUSTRIES =====*/
.breadcrumbs-blog .breadcrumb-item.active:last-child:before{
content: 'Blog';
margin-left: 4px;
display: block;
color: #1a2c47;
}
#breadcrumb-section{
border-top: 1px solid #f0f0f0;
padding: 25px 0 50px 0;
}
.breadcrumb{
background-color: transparent;
padding: 0;
margin: 0;
}
.breadcrumb .breadcrumb-item{
padding: 0;
}
.breadcrumb li a{
color: #0e50b2;
font-size: 14px;
font-weight: 700;
}
.breadcrumb li a:after{
width: 5px;
height: 8px;
content: '';
display: inline-block;
background-image: url('../img/icon-arrow-small.svg');
margin: 0 5px 1px;
}
.breadcrumb-item+.breadcrumb-item::before{
display: none;
}
.breadcrumb-item.active {
color: #1a2c47;
font-weight: 600;
font-size: 14px;
display: flex;
line-height: 22px;
align-items: flex-end;
}
#page-content .post-title{
font-size: 40px;
font-weight: 800;
line-height: 48px;
margin-bottom: 20px;
}
#page-content .featured-image{
max-width: 100%;
height: auto;
margin-bottom: 20px;
}
.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6{
font-weight: 700;
margin-bottom: 20px;
margin-top: 50px;
}
.editor-content h1{
font-size: 36px;
line-height: 48px;
}
.editor-content h2{
font-size: 32px;
line-height: 38px;
}
.editor-content h3{
font-size: 28px;
line-height: 34px;
}
.editor-content h4{
font-size: 24px;
line-height: 28px;
}
.editor-content h5{
font-size: 18px;
line-height: 30px;
}
.editor-content h6{
font-size: 14px;
line-height: 24px;
}
.editor-content p{
font-size: 18px;
font-weight: 400;
line-height: 30px;
}
.editor-content a:not(.btn){
text-decoration: underline;
}
.editor-content ul,
.editor-content ol{
padding-left: 20px;
margin: 0;
}
.editor-content ul li{
list-style-type: disc;
font-size: 18px;
line-height: 30px;
margin-bottom: 10px;
}
.editor-content ol li{
font-size: 18px;
line-height: 30px;
margin-bottom: 10px;
}
.editor-content img{
max-width: 100%;
height: auto;
}
.editor-content table{
width: 100%;
margin: 30px 0;
background-color: transparent;
}
.editor-content td,
.editor-content th {
padding: .75rem;
vertical-align: top;
border-top: 1px solid #dee2e6;
}
.editor-content .table-holder{
width: 100%;
overflow: auto;
}
/*-----SIDEBAR-----*/
.sidebar{
overflow: hidden;
}
.sidebar .sidebar-get-a-quote{
background-color: #082e69;
position: relative;
padding: 60px 20px;
text-align: center;
background-image: url('../img/sidebar-illustration-1.svg');
background-position: center bottom;
background-repeat: no-repeat;
border-radius: 3px;
}
.sidebar .sidebar-get-a-quote .get-a-quote-info{
position: relative;
z-index: 2;
}
.sidebar .sidebar-get-a-quote .get-a-quote-info h3{
color: #ffffff;
font-size: 24px;
font-weight: 700;
line-height: 32px;
margin-bottom: 25px;
}
.sidebar .sidebar-get-a-quote .get-a-quote-info .btn{
font-size: 18px;
}
.sidebar .sidebar-associated-links{
background-color: #f8f8f8;
padding: 25px 20px;
}
.sidebar .sidebar-associated-links h3{
font-size: 18px;
font-weight: 700;
line-height: 30px;
margin-bottom: 20px;
}
.sidebar .sidebar-associated-links ul{
margin: 0;
}
.sidebar .sidebar-associated-links ul li{
margin-bottom: 15px;
}
.sidebar .sidebar-associated-links ul li:last-child{
margin-bottom: 0;
}
.sidebar .sidebar-associated-links ul li a{
line-height: 26px;
font-size: 14px;
color: #0e50b2;
display: block;
}
.sidebar .list-boxed .parent{
width: 100%;
margin-bottom: 0;
}
.sidebar .list-boxed li ul li{
border-bottom: 1px solid #ededed;
}
.sidebar p,
.sidebar ul li,
.sidebar ol li{
font-size: 16px;
line-height: 26px;
}
.widget{
margin-bottom: 30px;
}
.widget h3{
font-weight: bold;
margin-bottom: 20px;
}
.sidebar .latest-posts{
border-top: 1px solid #e5e5e5;
padding-top: 30px;
margin: 0;
}
.sidebar .latest-posts li a{
display: block;
margin-bottom: 20px;
text-decoration: underline;
}
.sidebar .latest-posts li:last-child a{
border: none;
}
#big-get-a-quote{
margin-top: 100px;
padding: 120px 0;
background-color: #082e69;
background-image: url('../img/big-get-a-quote.png');
background-position: center bottom;
background-repeat: no-repeat;
color: #fff;
text-align: center;
font-size: 18px;
font-weight: 400;
line-height: 30px;
}
#big-get-a-quote h3{
font-size: 36px;
font-weight: 400;
line-height: 48px;
color: #fff;
font-weight: bold;
margin-bottom: 25px;
}
#big-get-a-quote p:first-of-type{
font-size: 24px;
line-height: 34px;
}
#big-get-a-quote .btn{
margin: 50px auto 0;
}
.editor-content img,
.editor-content .kg-width-full img,
.editor-content .kg-width-wide img{
max-width: 100%;
height: auto;
position: relative;
margin: 0;
border-radius: 5px;
}
.editor-content .kg-gallery-container {
display: flex;
flex-direction: column;
margin: 10px auto;
position: relative;
left: 50%;
transform: translateX(-50%);
z-index: 5;
}
.editor-content .kg-gallery-row {
display: flex;
flex-direction: row;
justify-content: center;
}
.editor-content .kg-gallery-image img {
display: flex;
object-fit: cover;
margin: 0;
width: 100%;
height: 100%;
}
.editor-content .kg-gallery-row:not(:first-of-type) {
margin: 10px 0 0 0;
}
.editor-content .kg-gallery-image:not(:first-of-type) {
margin: 0 0 0 10px;
}
.editor-content figcaption{
padding: 10px 15px;
font-size: 14px;
border-bottom: 1px solid #ededed;
}
.loop .post{
display: flex;
margin-bottom: 30px;
}
.loop .post .post-inner-content{
width: 100%;
position: relative;
overflow: hidden;
}
.loop .inner{
position: relative;
}
.post .img-holder {
overflow: hidden;
border-radius: 5px;
margin-bottom: 10px;
}
.post .img-holder .featured-image{
display: block;
width: 100%;
position: relative;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.post .img-holder .featured-image:before{
display: block;
content: '';
width: 100%;
padding-bottom: 75%;
}
#page-content .post .img-holder .featured-image{
margin: 0;
}
.post .inner-featured-image{
margin-bottom: 30px;
}
.loop .post:hover .img-holder .featured-image{
transform: scale(1.1, 1.1);
}
.loop h3{
font-size: 20px;
margin: 5px 0;
padding: 0;
font-weight: bold;
}
#load-posts{
display: flex;
width: 180px;
margin: 100px auto;
}
#load-posts.finish{
width: 260px;
opacity: .5;
}
.manual-tags{
display: flex;
flex-wrap: wrap;
}
.manual-tags a{
padding: 5px 10px;
background: #f0f0f0;
margin-right: 10px;
}
.loop-news .item:first-child .post{
border-top: 1px solid #9e9e9e;
padding-top: 30px;
}
.loop-news .post{
border-bottom: 1px solid #9e9e9e;
padding-bottom: 20px;
}
.loop-news .inner{
padding-right: 30px;
}
.loop-news .post-inner-content{
display: flex;
justify-content: space-between;
}
.loop-news .post-inner-content .post-meta{
min-width: 150px;
text-align: right;
}
#media screen and (max-width: 1199px) {
.sidebar .sidebar-get-a-quote .get-a-quote-info .btn {
font-size: 14px;
height: 50px;
}
#stats ul li p{
font-size: 16px;
}
#stats ul li p b{
font-size: 18px;
}
#industries ul li a{
font-size: 16px;
line-height: 1.2;
}
#why-obelis .blockquote p{
font-size: 18px;
line-height: 28px;
}
#stats ul li .img-inner{
width: 54px;
height: 54px;
}
.home-video iframe[src*="https://www.youtube.com/"] {
height: calc(210px / 1.77777778) !important;
width: 100% !important;
}
}
#media screen and (max-width: 991px) {
.navigation-trigger,
.mobile-nav,
.mobile-backdrop{
display: block;
}
.mobile-nav .logo img{
width: 200px;
height: 62px;
}
header .topbar{
display: none;
}
header .nav {
padding: 10px;
}
header .menu .nav {
display: none;
}
.navigation-trigger{
display: flex;
align-items: center;
}
.mobile-backdrop{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 998;
background: rgba(0, 0, 0, 0.5);
visibility: hidden;
opacity: 0;
pointer-events: none;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.mobile-nav{
position: fixed;
width: 100%;
max-width: 300px;
height: 100%;
left: 0;
top: 0;
z-index: 999;
transform: translateX(-100%);
background: #fff;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.menu-active .mobile-backdrop{
visibility: visible;
opacity: 1;
pointer-events: all;
}
.menu-active .mobile-nav{
transform: translateX(0);
}
header .mobile-nav .topbar{
display: block;
margin-bottom: 44px;
}
header .mobile-nav .nav{
display: block;
padding: 0;
}
header .mobile-nav .logo{
padding: 15px;
}
header .nav ul{
flex-direction: column;
}
header .nav ul li a{
display: flex;
padding: 10px 15px;
border-bottom: 1px solid #f8f8f8;
color: #143074;
font-weight: 600;
justify-content: space-between;
align-items: center;
text-decoration: none;
}
header .nav ul li a:focus,
header .nav ul li a:hover{
text-decoration: none;
}
header .nav ul li .btn{
margin: 15px;
}
header .topbar .container{
padding: 0;
}
header .topbar .search-btn{
display: none;
}
header .topbar .header-top{
justify-content: flex-start;
}
header .topbar .header-top ul{
width: 100%;
display: flex;
justify-content: flex-start;
white-space: nowrap;
overflow: auto;
}
header .topbar ul li{
margin-right: 0;
}
header .topbar ul li a{
display: flex;
padding: 5px 10px;
line-height: 24px;
}
header .mobile-nav{
overflow: auto;
}
header .mobile-nav .search{
visibility: visible;
opacity: 1;
left: 0;
max-width: 100%;
width: 100%;
height: 44px;
pointer-events: all;
}
header .mobile-nav .search input{
font-size: 14px;
}
header .mobile-nav ul li a i{
display: none;
}
header .mobile-nav ul li a[data-submenu] i{
display: inline-block;
margin-left: 10px;
}
#services .inner .service-holder p{
font-size: 16px;
line-height: 24px;
}
.industries-and-services .col-industries ul li{
width: 100%;
}
#stats{
overflow: auto;
}
#stats ul{
min-width: 1000px;
padding-right: 30px;
}
#about-us-section .who-we-are:before{
width: 100vw;
right: 50%;
transform: translateX(50%);
}
#about-us-section .who-is-it-for .inner {
padding-left: 0;
}
.submenu{
display: none !important;
}
header .mobile-nav .submenu{
position: relative;
top: 0;
left: 0;
opacity: 1;
visibility: visible;
padding: 0;
}
header .mobile-nav .active .submenu{
display: block !important;
}
header .mobile-nav .submenu p,
header .mobile-nav .submenu p + a,
header .mobile-nav .submenu .link{
display: none;
}
#industries-submenu ul{
margin: 0;
}
#industries-submenu ul li {
width: 100%;
margin-top: 0px;
padding-right: 0px;
}
.submenu h3{
margin: 0;
}
header .nav ul li .submenu a{
padding: 15px 30px;
border-bottom: 1px solid #aeb3bd;
margin-left: -15px;
width: calc(100% + 30px);
line-height: 1;
color: #143074;
}
.submenu-style-1 {
padding: 10px 0 10px 20px;
}
header .search .btn{
top: 2px;
transform: none;
right: 17px;
}
.list-boxed .parent{
width: calc(50% - 30px);
}
.safer-markets ul li{
width: 100%;
flex: auto;
margin-bottom: 30px;
border: none;
}
.home-video{
margin-top: 0;
}
.home-video iframe[src*="https://www.youtube.com/"] {
height: calc(510px / 1.77777778) !important;
width: 100% !important;
}
.why-obelis ul{
padding: 40px 20px;
}
}
#media screen and (max-width: 767px) {
.intro{
padding: 60px 0 100px 0;
}
.intro h1{
font-size: 30px;
}
.intro p{
font-size: 16px;
}
#why-obelis{
padding: 50px 0;
}
#about-us-section .who-is-it-for{
padding: 50px 0;
}
#about-us-section .inner {
padding: 50px 0;
}
#about-us-section .who-is-it-for .inner{
padding: 0;
}
.list-posts ul li b{
display: block;
margin: 0;
}
footer .footer-bottom ul{
flex-wrap: wrap;
}
.banner .text-right{
display: flex;
margin-bottom: 20px;
}
#services .features li{
width: 100%;
}
#services .inner .row:before, #services .inner .row:after,
#services .inner:before{
display: none;
}
#services .inner .service-holder{
padding: 30px 0;
}
#services .features{
margin: 0;
}
#services .inner{
border: none;
}
.section-title{
margin-bottom: 50px;
}
.list-boxed .parent{
width: 100%;
margin: 0 15px 15px;
}
.industries-and-services {
margin: 0 0 50px 0;
}
.loop .post .post-inner-content{
flex-direction: column;
}
.loop-news .post-inner-content .post-meta{
text-align: left;
}
.loop-news .post{
padding-bottom: 30px;
}
}
#media screen and (max-width: 575px) {
#why-obelis .blockquote{
padding: 60px 30px;
}
header .nav .menu .logo img,
.mobile-nav .logo img {
width: 100px;
height: auto;
}
footer .footer-top{
padding: 20px 0;
}
.home-video iframe[src*="https://www.youtube.com/"] {
height: calc((100vw - 30px) / 1.77777778) !important;
width: 100% !important;
}
}
I found the problem - but I think, you are able to solve it by your own, as you know better the structure of your project.
Open your Link with Chrome (or Firefox)
Press F12 and select the mobile resolution:
Here you can open the mobile menu and see the bug, as shown in your picture
Now try to change the width of the resolution in Chrome:
You will see, that the bug will be automatically fixed
When looking at the HTML and CSS in Developer Tools, while doing these steps, you will see, that they change. Therefore you have to look at, what is changing and try to find a solution here.
My guess in your case is that some CSS values are wrongly set at the beginning (maybe while initializing the page dynamically??).
UPDATE:
It seems, that the top CSS attribute in your li tag (parent sub-industries classes) causes the problem (which seems to be dynamically calculated).
Hope I could help!

Resources