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.
Related
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;
}
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;
}
}
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!
I've tried everything. I've tried to refresh the page multiple times, I've tried uploading various ways to ensure that the css file is updated. Nothing seems to work. My media queries don't seem to be overriding them, but in Dreamweaver, they work just fine.
Here is the code for the CSS:
header {
width: 100%;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
position: fixed;
top: 10px;
left: 0px;
right: 0px;
height: 55px;
border-bottom: 4px solid #636466;
margin-bottom: 10px;
margin-top: 0px;
}
#logo {
float: left;
background-image: url(wordsbyperla_wordpress%20header_small.png);
background-repeat: no-repeat;
height: 50px;
width: 40%;
position: absolute;
margin-top: 24px;
max-width: 411px;
background-size: 100%;
min-width: 300px;
background-position: bottom;
margin-bottom: 10px;
}
nav {
top: 40px;
position: absolute;
right: 3%;
width: auto;
vertical-align: text-bottom;
height: auto;
padding: 0;
font-size: 12px;
}
nav li {
list-style: none;
display: inline-block;
vertical-align: bottom;
height: auto;
top: auto;
}
.menu-item {
text-decoration: none;
list-style: none;
font-family: "Courier";
background-color: transparent;
width: auto;
display: inline-block;
margin-right: 20px;
}
.menu-item a , .menu-item a:visited, .menu-item a:active{
color: #000;
text-decoration: none;
list-style: none;
}
.menu-item a:hover {
color: #EC2726;
}
#searchform {
font-family: "Courier";
border: 1px solid #000000;
margin-bottom: 1px;
background-color: #fff;
}
#s {
border: none;
font-family: "Courier";
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
background-color: transparent;
margin-left: 5px;
}
#searchsubmit {
border: none;
font-family: "Courier";
margin: 0;
background-color: transparent;
}
#contentWrap {
position: absolute;
top: 100px;
right: 0px;
width: 100%;
overflow: auto;
bottom: 50px;
margin-right: 0px;
margin-top: 10px;
margin-left: 0px;
}
.meta {
width: 25%;
position: relative;
font-family: "Courier";
font-size: 12px;
margin-top: 20px;
margin-right: 70%;
margin-left: 0px;
max-width: 200px;
min-width: 100px;
}
.meta div {
text-decoration: none;
text-align: right;
padding-right: 20px;
padding-top: 0px;
}
.meta div a {
text-decoration: none;
color: #000;
}
.meta div a:hover, .meta div a:active {
color: #EC2726;
}
.meta span {
color: #EC2726;
text-transform: lowercase;
}
#tags {
color: #000;
margin-right: 10px;
right: auto;
width: auto;
}
.meta .pagination {
position: fixed;
left: 2%;
font-size: 14px;
font-family: "Courier";
bottom: 35px;
text-decoration: none;
max-width: 200px;
vertical-align: middle;
text-align: right;
right: 70%;
width: 23%;
}
.meta .pagination ul {
padding-right: 25px;
}
.meta .pagination li {
display: inline-block;
list-style: none;
text-decoration: none;
font-family: "Courier";
color: #000;
}
.meta .pagination a , .meta .pagination a:visited{
text-decoration: none;
text-align: left;
margin: 0;
color: #000;
}
.meta .pagination a:hover , .meta .pagination a:active {
color: #EC2726;
}
.meta2 {
height: auto;
width: 75%;
margin-left: 21%;
position: relative;
padding-left: 15px;
min-width: 300px;
top: -50px;
}
.meta2 a , .meta2 a:visited {
font-family: "Helvetica Neue";
text-transform: lowercase;
font-style: normal;
font-weight: bolder;
text-decoration: none;
color: #000;
font-size: 18px;
margin-top: 10px;
}
a:hover, a:active, .meta2 a:hover{
color: #EC2726;
}
.entry p {
font-family: Helvetica;
font-size: 12px;
font-style: normal;
font-weight: 200;
margin-bottom: 50px;
margin-top: -15px;
}
footer {
margin-top: 10px;
position: fixed;
bottom: 10px;
width: 100%;
height: 30px;
/* [disabled]background-color: #f7f7f7; */
border-top: 3px inset #636466;
font-family: Courier;
font-size: 10px;
/* [disabled]display: inline; */
left: 0px;
}
footer ul {
float: right;
margin-right: 3%;
/* [disabled]margin-left: 5px; */
display: inline-block;
width: auto;
list-style: none;
}
And here is the code for the #media query for the iPhone 6:
/*iphone 6+*/
#media (device-width:414px) and (device-width:736px) and (-webkit-device-pixel-ratio: 3){
#contentWrap {
top: 85px;
}
#logo {
width: 90%;
}
.meta {
margin-top: 20px;
margin-right: auto;
margin-left: auto;
margin-bottom: 0px;
width: 100%;
max-width: none;
top: auto;
padding: 0;
text-align: right;
}
.meta div {
margin: 0;
text-align: right;
padding: 0;
width: 100%;
}
.meta2 {
width: 96%;
max-width: none;
margin-top: 55px;
margin-right: 3%;
margin-left: 3%;
padding: 0;
margin-bottom: auto;
}
.entry p {
margin-top: -15px;
padding: 0;
width: 100%;
margin-left: 0px;
margin-right: 0px;
}
.meta .pagination {
width: 100%;
max-width: none;
text-align: center;
bottom: 25px;
height: 30px;
vertical-align: middle;
}
footer {
position: fixed;
height: 7px;
text-align: center;
margin-right: auto;
margin-left: auto;
}
footer ul {
margin-bottom: auto;
margin-top: auto;
text-align: center;
margin-right: auto;
margin-left: auto;
padding: 0;
float: none;
}
footer li {
margin: auto;
text-align: center;
float: none;
}
nav {
padding-top: 0;
padding-right: 20px;
padding-left: 20px;
padding-bottom: 0;
top: -10px;
text-align: center;
/* [disabled]margin-left: 3%; */
/* [disabled]margin-right: 8%; */
width: 100%;
}
.meta div {
margin: 0;
text-align: right;
padding: 0;
width: 100%;
}
}
<head>
<title>WCK&TMB</title>
<style>
* {
margin: 0px;
padding: 0px;
}
html, body {
width: 100%;
background-color: #FFC18F;
}
div#container {
width: 100%;
min-width: 1024px;
}
header {
height: 100px;
width: 100%;
background-color: #ff8400;
text-align: center;
}
header img {
clear: left;
float: left;
margin: 10px;
}
header a#purchase {
background: url("http://i.imgur.com/RJe8a1D.png") repeat-x;
width: 500px;
height: 25px;
margin: 30px;
padding: 5px;
border: 3px double #ccc;
text-align: center;
float: right;
font-family: Arial;
font-size: 20px;
text-decoration: none;
color: #ffffff;
}
section#main {
padding: 0px 0px 10px 0px;
text-align: center;
}
section#main div#head_announcements {
padding-top: 10px;
color: #000;
font-family: "Arial";
}
section#main div#head_announcements h2 {
font-size: 24px;
font-weight: lighter;
line-height: 26px;
}
section#main h2 a {
color: #FFFFFF;
text-decoration: none;
}
section#main h2 a:hover {
color: #000000;
}
section#main nav {
background: url("./images/navBG.png") repeat-x;
width: 100%;
height: 35px;
text-align: center;
}
section#main nav a.link {
font-family: "Century Gothic";
text-decoration: none;
color: white;
font-size: 25px;
vertical-align: top;
float:center;
}
section#main nav a.link:nth-of-type(1) {
float:center;
}
section#main nav a.link:hover {
color: #39F;
}
section#main nav a.link.active {
color: #39F;
}
section#main section#frames {
margin-top: 10px;
width: 100%;
}
section#main section#frames iframe {
border: 0px;
outline: 0px;
overflow: hidden;
margin: 0px;
padding: 0px;
}
section#main section#frames iframe#frame1 {
width: 650px;
height: 450px;
background-color: black;
}
section#main section#frames iframe#frame2 {
width: 350px;
height: 450px;
}
footer {
padding: 10px 0px 10px 0px;
width: 100%;
text-align: center;
height: 110px;
}
</style>
</head>
URL: http://skyaccess.se/forum/misc.php?page=hdppvs
I can't seem to center the navigation bar text. Can someone please correct this?
Also, I'm trying to learn CSS so if anyone could show me a great site, I'd be very thankful. Considering paying $29/mo are some interaction website with points.
add float:left in your css:
section#main nav {
background: url("./images/navBG.png") repeat-x;
width: 100%;
height: 35px;
text-align: center;
float: left;
also add this css for create gaping between navigation: "padding-right: 40px;".
section#main nav a.link {
font-family: "Century Gothic";
text-decoration: none;
color: white;
font-size: 25px;
vertical-align: top;
float: center;
padding-right: 40px;