Need to fix my footer to the bottom - html

I am trying to put a footer at the bottom of the page.
I am unable to make this page's footer correct.
I tried a lot tips and trick that I found but nothing helped me.
I do not want the position fixed, I want the footer under the content.

Add this too your footer style:
position: fixed;
bottom: 0;
z-index: 10;
Entire style sheet:
/*!
* Start Bootstrap - Half Slider (http://startbootstrap.com/template-overviews/half-slider)
* Copyright 2013-2017 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-half-slider/blob/master/LICENSE)
*/
html, body { height: 100%; width: 100%; margin: 0;
}
footer{display: block;color: white;width: 100%;background-color: rgb(28,28,28);text-align: center;padding: 10px;position: fixed;bottom: 0;z-index: 10;}
.cock {
}
.telicko {
height: 95.5%;
}
.sicko {
width: 100%;
height: 80%;
position: absolute;
top: 5%;
}
.snavik{
float: left;
margin-top:8vh;
}
.nav {
list-style-type: none;
text-decoration:none;
}
.jednicka a.active{
background-color: rgb(50,134,171);
color: white;
border-radius: 3px;
}
.dvojka a.active{
background-color: rgb(202,76,77);
color: white;
border-radius: 3px;
}
.trojka a.active{
background-color: rgb(219,162,10);
color: white;
border-radius: 3px;
}
.stvorka a.active{
background-color: rgb(132,177,58);
color: white;
border-radius: 3px;
}
.patka a.active{
background-color: black;
color: white;
border-radius: 3px;
}
.jednicka a {
color: black;
}
.dvojka a {
color: black;
}
.trojka a {
color: black;
}
.stvorka a {
color: black;
}
.patka a {
color: black;
}
.jednicka:hover a {
background-color: rgb(50,134,171);
color: white;
border-radius: 3px;
}
.dvojka:hover a{
background-color: rgb(202,76,77);
color: white;
border-radius: 3px;
}
.trojka:hover a{
background-color: rgb(219,162,10);
color: white;
border-radius: 3px;
}
.stvorka:hover a{
background-color: rgb(132,177,58);
color: white;
border-radius: 3px;
}
.patka:hover a{
background-color: black;
color: white;
border-radius: 3px;
}
.objb{
margin-bottom: 2%;
margin-top: 2%;
}
.sobrazky {
margin-top: 4%;
margin-bottom: 7vh;
}
.objbb {
margin-top: 2%;
margin-bottom: 1%;
}
.odpovede {
margin-top:8vh;
margin-left: 20vw;
height: 100%;
width: 70%;
}
.ulicko {
margin-left: -26px;
}
.carousel-item {
height: 50vh;
min-height: 150px;
width: 100%;
background: no-repeat center center scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
margin: 0 auto;
}
#PART1{
padding: 0;
margin: 0;
width: 80%;
height: 25%;
margin: 0 auto;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: center;
-webkit-box-align: center;
}
#PART2a{
padding: 0;
margin: 0;
width: 100%;
height: 25%;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: center;
-webkit-box-align: center;
position: absolute;
top: 45%;
left: 25%;
transform: translate(-50%, -50%);
}
#PART2b{
padding: 0;
margin: 0;
width: 100%;
height: 25%;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: center;
-webkit-box-align: center;
position: absolute;
top: 70%;
left: 50%;
transform: translate(-50%, -50%);
}
.smenu{
position: absolute;
top: 15%;
left: 3%;
}
.snav {
list-style-type: none;
}
.nav-item a:hoover{
color: rgb(236,212,146);
}
.uo {
width: 40%;
display: block;
margin-top: 40%;
}
.medzera {
height: 5vh;
width: 100%;
}
.tretiavec {
width: 35%;
padding-left: 5%;
}
.krok1{
display: flex;
align-items: center;
justify-content: center;
font-size: 150%;
color: black;
border:2px solid rgb(216,192,126);
width: 60px;
height: 60px;
border-radius: 100%;
margin: 0 auto;
background-color: rgb(236,212,146);
}
.krok2{
display: flex;
align-items: center;
justify-content: center;
font-size: 150%;
color: black;
border:2px solid rgb(216,192,126);
width: 60px;
height: 60px;
border-radius: 100%;
margin: 0 auto;
background-color: rgb(236,212,146);
}
.krok3{
display: flex;
align-items: center;
justify-content: center;
font-size: 150%;
color: black;
border:2px solid rgb(216,192,126);
width: 60px;
height: 60px;
border-radius: 100%;
margin: 0 auto;
background-color: rgb(236,212,146);
}
.txta {
width: 20vw;
height: 15vh;
}
.formularo {
position: absolute;
top: 10%;
left:10%;
margin-top: 2%;
padding-bottom: 7%;
width: 80vw;
display: flex;
}
.idd{
text-align: center;
}
.contactformularo{
border-right: 2px solid black;
width: 33%;
padding-right: 5%;
}
.objto {
margin: 0 auto;
margin-top: 10vh;
}
.lolo {
text-align: center;
}
.containerch {
display: block;
position: relative;
padding-left: 35px;
margin-bottom: 12px;
cursor: pointer;
font-size: 22px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
width:100%;
}
.chbox1, .chbox2, .chbox3, .chbox4, .chbox5 {
position: absolute;
opacity: 0;
}
.checkmark {
position: absolute;
top: 0;
left: 0;
height: 25px;
width: 25px;
background-color: #eee;
border-radius: 3px;
}
#checkmark1{
border: 1px solid rgb(50,134,171);
}
#checkmark2{
border: 1px solid rgb(202,76,77);
}
#checkmark3{
border: 1px solid rgb(219,162,10);
}
#checkmark4{
border: 1px solid rgb(132,177,58);
}
#checkmark5{
border: 1px solid black;
}
.containerch:hover input ~ .checkmark {
background-color: #ccc;
}
.containerch input:checked ~ #checkmark1 {
background-color: rgb(50,134,171);
}
.containerch input:checked ~ #checkmark2 {
background-color: rgb(202,76,77);
}
.containerch input:checked ~ #checkmark3 {
background-color: rgb(219,162,10);
}
.containerch input:checked ~ #checkmark4 {
background-color: rgb(132,177,58);
}
.containerch input:checked ~ #checkmark5 {
background-color: black;
}
.checkmark:after {
content: "";
position: absolute;
display: none;
}
.containerch input:checked ~ .checkmark:after {
display: block;
}
.containerch .checkmark:after {
left: 7px;
top: 3px;
width: 40%;
height: 65%;
border: solid white;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.answerhos {
}
.modind {
overflow: inherit;
}
.iu {
cursor:pointer
}
.iui {
width: 18vh;
height: 18vh;
border-radius: 100px;
top: 5vh;
display:flex;
justify-content:center;
align-items:center;
margin-left: auto;
margin-right:auto;
}
.modind .hosind .promind .kompind {
width: 100%;
}
.ciarka {
margin-top: 10%;
}
.iuii {
width: 115px;
height:115px;
border-radius: 100px;
top: 5vh;
display: flex;
justify-content:center;
align-items:center;
margin-left: auto;
margin-right:auto;
}
.objednavkaformularo{
float: right;
padding: 5%;
border-right: 2px solid black;
vertical-align: middle;
}
.iui img{
vertical-align:middle;
display:inline-block;
}
.iuii img {
}
.idd {
font-size: 20px;
font-weight: bold;
}
.textik {
font-size: 16px;
width: 60%;
height: 1vh;
margin: 0 auto;
}
.resized {
display: none;
}
.penisnadpis {
margin-left: 1%;
color: rgb(236,212,146);
}
/* pokus o responsivitu */
#media only screen and (max-width: 700px) {
body {
}
#PART1 {
display: none;
}
footer {
position: fixed;
bottom: 0;
}
.uo{
margin-top: 0%;
}
.penisnadpis {
margin-left: 0%;
}
.iui {
float: left;
margin-left: 10vw;
}
.iuii {
float: left;
margin-left: 10vw;
}
.uo {
display: none;
}
.resized {
display: block;
margin-top: 5%;
margin-bottom: 20%;
width: 100%;
}
.texticek {
font-size: 17px;
}
.ibutton {
margin-top:5vh;
}
}
#media only screen and (max-width: 1100px) {
body {
}
#PART1 {
width: 100%;
}
}
#media only screen and (max-width: 1550px) {
body {
background-color:
}
.textik {
width: 85%;
}
#PART1{
width: 90%;
}
}
#media only screen and (max-width: 1000px) {
body {
background-color:
}
#PART1{
width:100%;
}
.textik {
width:95%;
font-size: 13px;
}
.uo {
margin-top: 40%;
}
}
#media only screen and (max-height: 600px) {
body {
}
.telicko {
height:100%;
}
footer {
margin-top: 3%;
}
}

Related

How to make the height of all div are equal?

I have been fixing my codes since last night, I cannot add more height: 100% in some class names because it just messed up the output worse.
This is my codepen -> https://codepen.io/sasddd/pen/QWKPPwg
Just view this in details view so you can see the difference in spaces.
Here's my codes in PUG
.content
section.event
.container__content
.event__title-container
.title
.title__lines
h1.title__text EVENT
.content__item-container.content__item-container--event
a.content__item(href="#")
img.content__image.content__image--event(
src="https://i.picsum.photos/id/1022/6000/3376.jpg?hmac=FBA9Qbec8NfDlxj8xLhV9k3DQEKEc-3zxkQM-hmfcy0"
)
.content__wrapper.content__wrapper--event
.content__date.content__date--event
p.content__date-text 22 Jun, 2020
.content__category-wrapper.content__category-wrapper--event
p.content__title さまざまな業種や形態の体験施策に携わってきた経験値を武器に難な状...況を乗り越える さまざまな業種や形態の体験施策に携わってきた経験値を武器に難な状...況を乗り越える
.event__title-line
.event__description-container
p.content__title--event 開催日:2020年12月24日
p.content__title--event 開催場所:東京都 渋谷区
p.content__title--event カテゴリ:フリーマーケット
a.content__item(href="#")
img.content__image.content__image--event(
src="https://i.picsum.photos/id/1022/6000/3376.jpg?hmac=FBA9Qbec8NfDlxj8xLhV9k3DQEKEc-3zxkQM-hmfcy0"
)
.content__wrapper.content__wrapper--event
.content__date.content__date--event
p.content__date-text 22 Jun, 2020
.content__category-wrapper.content__category-wrapper--event
p.content__title 宮津満腹祭 うまいもん集まれ 2020年12月24日開催
.event__title-line
.event__description-container
p.content__title--event 開催日:2020年12月24日
p.content__title--event 開催場所:東京都 渋谷区
p.content__title--event カテゴリ:フリーマーケット
a.content__item(href="#")
img.content__image.content__image--event(
src="https://i.picsum.photos/id/1022/6000/3376.jpg?hmac=FBA9Qbec8NfDlxj8xLhV9k3DQEKEc-3zxkQM-hmfcy0"
)
.content__wrapper.content__wrapper--event
.content__date.content__date--event
p.content__date-text 22 Jun, 2020
.content__category-wrapper.content__category-wrapper--event
p.content__title 宮津満腹祭 うまいもん集まれ 2020年12月24日開催
.event__title-line
.event__description-container
p.content__title--event 開催日:2020年12月24日
p.content__title--event 開催場所:東京都 渋谷区
p.content__title--event カテゴリ:フリーマーケット
p.content__title--event カテゴリ:フリーマーケット
Here's my codes in SCSS
// EVENT SCSS
.event {
position: relative;
&__title-container {
margin-top: 61px;
}
&__title-line {
border-top: 1px solid black;
margin-left: 6px;
padding-left: 20px;
height: 100%;
}
&__description-container {
display: inline-block;
border-left: 1px solid black;
height: 100%;
}
}
// CONTENT.SCSS
.content {
position: relative;
&__image {
width: 380px;
height: 210px;
object-fit: cover;
object-position: center;
border: 5px solid white;
&--small {
border: 4px solid white;
width: 278px;
height: 156px;
}
&--category {
border: 4px solid white;
margin-top: 22px;
}
&--event {
border: 4px solid white;
height: 200px;
}
}
&__item {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
width: 378px;
color: black;
margin: 0;
&--small {
width: 278px;
margin-bottom: 31px;
}
&:not(:nth-child(3n + 3)) {
margin-right: 35px;
}
&--category {
// blank
}
}
&__item-container {
width: 1220px;
display: flex;
flex-wrap: wrap;
margin-top: 27px;
height: 100%;
&--small {
width: 907px;
}
&--category {
width: 100%;
}
&--event {
width: 100%;
}
}
&__date {
position: absolute;
margin-top: 5px;
left: -5px;
top: 38px;
height: 28px;
white-space: nowrap;
transform: rotate(-90deg);
&--small {
left: -10px;
}
&--category {
left: -25px;
}
&--event {
top: 170px;
left: 25px;
}
}
&__date-text {
font-size: 12px;
&--category {
font-size: 12px;
}
}
&__wrapper {
position: relative;
display: flex;
justify-content: center;
width: 100%;
height: 100%;
padding-top: 8px;
padding-left: 50px;
&--category {
padding-left: 12px;
}
&--event {
justify-content: center;
align-items: center;
width: 100%;
// height: 100%;
}
}
&__category-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
&--small {
//blank
}
&--sp {
//blank
}
&--event {
display: block;
width: 100%;
// height: 100%;
}
}
&__category-line {
border-left: 1px solid black;
margin-left: 6px;
margin-top: 15px;
padding-bottom: 5px;
padding-right: 8px;
&--small {
margin-left: -5px;
}
}
&__category-text {
font-size: 16px;
letter-spacing: 0.1em;
padding-left: 19px;
width: 338px;
max-width: 100%;
&--small {
width: 234px;
padding-left: 14px;
}
&--sidepanel {
width: 100%;
padding-left: 0;
line-height: 2.25em;
}
&::before {
content: " \25A0";
padding-right: 14px;
cursor: pointer;
}
&--skyblue {
color: blue;
}
&--islamicgreen {
color: green;
}
&--tawny {
color: yellow;
}
&--purple {
color: purple;
}
&--amaranth {
color: red;
}
}
&__title-line {
border-top: 1px solid black;
border-left: 1px solid black;
margin-left: 6px;
padding-right: 8px;
padding-bottom: 21px;
height: 100%;
&--small {
margin-left: -13px;
padding-bottom: 5px;
padding-right: 0;
}
&--category {
padding-bottom: 2px;
}
// &--event {
// border-left: 1px solid $border;
// margin-left: 6px;
// padding-right: 8px;
// height: 100%;
// }
}
&__title {
padding-top: 21px;
padding-left: 22px;
font-size: 24px;
font-weight: bold;
line-height: 1.5em;
width: 338px;
max-width: 100%;
height: 100%;
&--small {
padding-top: 13px;
padding-left: 15px;
padding-right: 8px;
font-size: 18px;
line-height: 1.44em;
width: 234px;
}
&--sidepanel {
font-size: 18px;
line-height: 1.5em;
padding-top: 0;
padding-left: 0;
width: 100%;
}
&--event {
padding-top: 13px;
padding-left: 15px;
padding-right: 8px;
font-size: 16px;
width: 234px;
}
}
}
Here something that you could try:
Refer to this answer, edit class content__title to make it fixed lines.
Remove justify-content: center; align-items: center; from class content__wrapper--event to make the content not in center.
I just play with my codes and I created a new container and added height: 100%;. That's it!

My dropdown menu keeps appearing when I don't want it too

So, I got a navigation bar with dropdown menus. Whenever I move my cursor where the drop-down menu is hidden, it opens, and I need to disable that without disabling the drop-down menu as a whole. Any tips on how to do that?
If you want to go ahead and look at the latest version of my website can be found below.
Here's the link: https://p1ayerone.github.io/
And here's the CSS code:
#import url('https://fonts.googleapis.com/css2?family=Roboto:wght#300&display=swap');
:root {
--background: rgba(54, 57, 63, .85);
}
*,
*::before,
*::after {
margin: 0px;
padding: 0px;
box-sizing: inherit;
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
background: url(../../img/bg/bg.png) fixed center;
background-attachment: fixed;
background-position: center;
font-family: 'Roboto', sans-serif;
font-weight: 400;
box-sizing: border-box;
color: silver;
}
.content {
height: 200vh;
background-size: cover;
display: grid;
place-items: center;
}
/* navigation styles start here */
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
}
.img-logo {
margin-right: 15px;
padding-top: 8px;
margin-bottom: -10px;
}
.nav-toggle {
display: none;
}
.nav-toggle-label {
position: absolute;
top: 0;
left: 0;
margin-left: 1em;
height: 100%;
display: flex;
align-items: left;
margin-top: 3.5%;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
display: block;
background: white;
height: 2px;
width: 2em;
border-radius: 2px;
position: relative;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after {
content: '';
position: absolute;
}
.nav-toggle-label span::before {
bottom: 7px;
}
.nav-toggle-label span::after {
top: 7px;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
padding-bottom: 1.7%;
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
margin-bottom: -21px;
padding-bottom: -15px;
}
.nav-main-item {
display: inline-block;
width: 12rem;
position: relative;
}
li {
list-style: none;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: #eee;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: gray;
}
.nav-main-item:hover > * {
opacity: 1;
margin: 0;
}
.navi-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.more-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.nav-toggle:checked ~ nav {
transform: scale(1,1);
}
.nav-toggle:checked ~ nav a {
opacity: 1;
transition: opacity 250ms ease-in-out 250ms;
}
.destiny-intro-p {
padding-left: 100px;
font-size: 1.3rem;
}
.destiny-intro-h1 {
font-size: 3rem;
}
.body-block {
background-color: black;
color: white;
padding-bottom: 6%;
}
#media screen and (min-width: 800px) {
.nav-toggle-label {
display: none;
}
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
padding-top: 15;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
}
.nav-main-item {
display: inline-block;
width: 10rem;
position: relative;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: white;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: silver;
}
.nav-main-item:hover > * {
opacity: 1;
margin: 0;
}
.navi-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.Discord {
float: right;
}
.gif-Destiny {
width: 200px;
float: right;
color: silver;
}
.Zachary {
color: black;
text-decoration: none;
}
.introduction {
color: black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
margin-top: 100%;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
}
.Discord {
float: right;
}
.img-Destiny {
padding-top: 0px;
width: 300px;
float: right;
color: black;
}
.Zachary {
color: black;
text-decoration: none;
}
.introduction {
color: black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
/* Videos */
.tse {
color: #07FC1B;
text-align: center;
}
/* Characters */
.img-TBG {
background-color: white;
color: black;
float: left;
width: 300px;
height: 500px;
}
/* Applications */
.silver-box {
background-color: silver;
color: black;
height: 1400px;
width: 640px;
}
/* About Me */
.abtme {
width: 50%;
margin: 0 auto;
}
/* Links */
.contact-me {
color: silver;
}
.gmail-footer {
color: silver;
}
.twitter-footer {
color: silver;
}
/* Contact */
.contact-title {
margin-top: 100px;
color: white;
text-transform: uppercase;
transition: all 4s ease-in-out;
}
.contact-title h1 {
font-size: 32px;
line-height: -10px;
}
.contact-title h2 {
font-size: 16px;
}
form {
margin-top: 50px;
transition: all 4s ease-in-out;
}
.form-control {
width: 600px;
background: var(--background);
border: none;
outline: none;
border-bottom: 1px solid gray;
color: white;
font-size: 18px;
margin-bottom: 16px;
}
input {
height: 45px;
}
form .submit {
background: #ff5722;
border-color: transparent;
color: #fff;
font-size: 20px;
font-weight: bold;
letter-spacing: 2px;
height: 50px;
margin-top: 20px;
}
form .submit:hover {
background-color: #f44336;
cursor: pointer;
}
Instead of using opacity:0 and opacity:1 to display the dropdown, you can use display:none and display:inline-block. When using opacity, it doesn't remove the element from the page, which is why the dropdown would appear when hovering in that area.
Can read more about this here https://magnusbenoni.com/difference-between-display-visibility-opacity/
.nav-main-item:hover > .navi-main-item {
display: inline-block;
margin: 0;
}
.navi-main-item {
display: none;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}

CSS: Slider overlaps Drop down Menu on Mobile - Z-Index issue?

Update:
I'm sure this will be easy fix for advanced members. I have created drop down menu with the 'nav' element. For some reason as hard as I try, I cannot get the menu to overlap the slider images below it when you expand it on mobile. I've tried lowering the Z-index on the slider and raising it on the menu. What am I doing wrong? Thanks in advance:
UPDATE: Here is a fiddle link as requested by a comment which includes the HTML. https://jsfiddle.net/wknow6cv/#&togetherjs=ADxkd31O6q
#import 'https://fonts.googleapis.com/css?family=Alegreya+Sans';
* {
margin: 0;
padding: 0;
border: 0;
overflow-x: hidden;
}
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
body {
background: #F5F5F5;
color: #67727A;
font-family: 'Alegreya', Sans-serrif;
margin: 0;
}
h3 {
font-size: 150%;
line-height: 155%;
padding: 5% 0;
font-weight: 400;
}
p{
font-size: 120%;
line-height: 150%;
padding: 3%;
text-indent: 2%;
text-align: center;
}
img{
max-width: 100%;
height: auto;
width: auto;
margin-bottom: -4px;
}
header{
background-color: #6991AC;
width: 100%;
height: 120px;
}
h1{
position:absolute;
right: 600px;
top:30px;
}
#top-left-menu {
right: 0px;
}
#logo{
margin: 20px;
float: left;
width: 380px;
height: 60px;
background: url(img/RD.png) no-repeat center;
left: 0px;
top: 0px;
}
p {
font-size: 1.4vw;
}
h3{
font-size: 1.5vw;
}
/*--- Start Navigation --*/
nav{
float: right;
padding: 25px 20px 0 0; /*--top right bottom left--*/
}
#menu-icon{
display: hidden;
width: 40px;
height: 40px;
background: url(img/nav.png) center;
}
a:hover#menu-icon {
border-radius: 4px 4px 0 0;
}
ul{
list-style-type: none;
}
nav ul li {
font-family: 'Alegreya Sans', Sans-serrif;
font-size: 150%;
display: inline-block;
/*makes the links go left from right instead of up and down*/
float: left;
padding: 10px;
}
nav ul li a {
text-decoration: none;
color: #F5F5F5;
}
nav ul li a:hover {
color: #C3D7DF;
}
/*.current{
color: #C3D7DF;
}
/*--End Navigation--*/
.one-fourth {
width: 25%;
float: left;
text-align: center;
font-family: Arial;
color: #F0F0F0;
}
#cloud {
background-color: #C3D7DF;
}
#lock {
background-color: #6991AC;
}
#headset {
background-color: #C3D7DF;
}
#truck {
background-color: #6991AC;
}
.one-fourth i { /*--Icons at one fourth blocks--*/
color: #F0F0F0;
font-size: 410%;
padding: 13% 0 4% 0;
}
article {
float: left;
margin: 0 auto;
width: 50%;
height: auto;
}
#sec-1 {
background-color: #FFFFFF;
}
aside {
float: right;
margin: 0 auto;
width: 50%;
height: auto;
}
.one-third {
width: 33.3333333%;
float: left;
text-align: center;
color: #FFFFFF
}
#google{
background-color: #A2B1C1;
}
#marketing {
background-color: #BEB9AD;
}
#customers {
background-color: #AADCD2;
}
/*--Start Footer--*/
footer {
background-color: #4682B4;
width: 100%;
}
.social {
list-style-type: none;
text-align: center;
}
.social li {
display: inline;
}
.social i { /*--icons--*/
font-size: 220%;
padding: 3% 3% 3% 2%;
color: #C3D7DF;
}
.social i:hover {
color: F5F5F5;
}
footer.second { /*--Socket--*/
border-top: 1px solid #AADCD2;
background-color: #544B59;
max-height: 55px;
text-align: center;
margin: 0;
}
footer.second p {
padding: 5px 0 9px 0;
text-align: center;
}
.carouselbox {
font-family: helvetica,sans-serif;
font-size: 14px;
width: 100px;
position: relative;
margin: 1em;
border: 1px solid #ccc;
box-shadow: 2px 2px 10px #ccc;
overflow: hidden;
}
.content {
margin: 0;
padding: 0;
}
.content li {
font-size: 100px;
margin: 0;
padding: 0;
width: 100%;
list-style: none;
text-align: center;
}
.new-inner {
height: 800px;
width: 100%;
float: left;
background-color: #FFFAFA;
font-family: Arial;
}
.nip1 {
width: 40%;
}
/*---------Insert Slideshow stuff below------*/
.cycle-slideshow{
width: 100%;
display: block;
position: relative;
margin: 0 auto;
overflow: hidden;
}
.cycle-prev, .cycle-next {
font-size: 200%;
color: #FFF;
top: 50%;
display: block;
position: absolute;
z-index: 9999;
cursor: pointer;
}
.cycle-prev {left: 10%;}
.cycle-next {right: 10%}
.cycle-pager{
width: 100%;
text-align: center;
display: block;
position: absolute;
bottom: 20px;
z-index: 9999;
cursor: pointer;
}
.cycle-pager span {
text-indent: 100%;
white-space: normal;
width: 12px;
height: 12px;
display: inline-block;
border: 1px solid #FFF;
border-radius: 50%;
margin: 0 10px;
}
.cycle-pager .cycle-pager-active {background: #FFF;}
/*------------MEDIA QUERIES ARE NOW STARTING-------------*/
#media screen and (max-width: 768px){
p {
font-size: 250%;
}
h3{
font-size: 260%;
}
header{
width: 100%;
}
#logo {
margin: 15px 0 20 -25px;
background: url(img/RD_mobile.png) no-repeat center;
float: left;
width: 170px;
height: 60px;
}
#menu-icon {
display: inline-block;
}
nav ul, nav:active ul {
display: none;
z-index: 1000;
position: absolute;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}
nav:hover ul {
display: block;
}
nav li {
text-align: center;
width: 100%;
padding: 10px 0;
}
.one-fourth {
float: left;
width: 100%;
font-size: 30%;
}
.one-fourth i {
font-size: 500%;
padding: 4% 0 1% 0;
}
article {
width: 100%;
}
aside {
width: 100%;
}
.hand-mobile {
display: none;
}
.social i {
font-size: 100%;
}
}
Maybe try to change the media queries nav to position: relative;
EDIT:
Try this instead, change the display: none to inline:
nav ul, nav:active ul {
display: inline;
z-index: 1000;
position: relative;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}

Header div disappears in Safari when screen width more than 1024px?

I'm trying to iron out browser inconsistancies in a website I've been building, and my main issue is that in Safari the header disappears when the screen width is more than 1024px. It's not just the image that isn't visable, everything inside the header is gone. It's fine at a narrower width, and in Firefox, Chrome and Opera.
Has anyone else experienced this? Does anyone know how to fix it?
Link to my Codepen below...
http://codepen.io/ajbater7/pen/aZzmjy
/******************************
GENERAL
******************************/
body {
font-family: "Montserrat","Open Sans","Arial",sans-serif;
display: flex;
flex-direction: column;
min-height: 100vh;
box-sizing: border-box;
}
.container {
flex: 1;
}
a {
text-decoration:none;
}
img {
max-width: 100%;
}
.top {
width: 20px;
height: 20px;
}
/******************************
CONTAINER
******************************/
.container {
padding-left: 5%;
padding-right: 5%;
margin: 50px auto;
}
a, a:visited {
color: #222222;
}
/******************************
HEADING
******************************/
.banner {
position: relative;
}
.name {
text-align:center;
margin: 0;
}
.name a {
padding-left: 10px;
padding-right: 10px;
display: block;
color: #fff;
}
.video-loop {
object-fit: cover;
width: 100%;
height: 100%;
background-color: black;
display: none;
}
.main-image {
object-fit: cover;
width: 100%;
height: 100%;
background-color: black;
position: relative;
}
.main-header {
position: relative;
width: 100%;
height: 100%;
}
.name-nav {
margin: auto;
position: absolute;
bottom: 20px; right: 0; left: 0;
}
h1 {
text-transform: uppercase;
font-family: "Montserrat","Open Sans","Arial",sans-serif;
font-weight: normal;
font-size: 1em;
line-height: 1.2em;
letter-spacing: 3px;
}
/******************************
NAVIGATION
******************************/
.main-nav {
text-align: center;
padding:5px 10px;
margin: 0;
font-family: "Montserrat","Open Sans","Arial",sans-serif;
font-weight: normal;
font-size: .7em;
text-transform: uppercase;
list-style-type: none;
letter-spacing: 2px;
}
.main-nav li {
margin-top: 8px;
margin-bottom: 8px;
}
.main-nav a {
font-weight: 300;
padding-left: 15px;
padding-right: 15px;
display: block;
color: #fff;
transition-duration: .5s;
transition-property: color;
}
.main-nav .selected, .main-nav a:hover {
color: #ffae00;
}
.main-nav .current {
color: #ffae00;
}
/******************************
GALLERY
******************************/
.feature {
text-transform: uppercase;
font-size: .7em;
margin-bottom: 25px;
color: #ffae00;
letter-spacing: 2px;
text-align: center;
}
.gallery {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: center;
text-align: center;
justify-content: center;
max-width: 900px;
margin: auto;
}
.thumb {
position: relative;
overflow: hidden;
max-width: 260px;
max-height: 100%;
line-height: 0;
margin: 10px;
}
.image-container img {
max-width: 100%;
}
.thumb:hover img, .thumb:focus img {
transform: scale(1.37);
transition-duration: .4s;
transition-timing-function: ease-out;
}
.photo-overlay {
position: absolute;
color: #fff;
top: 0;
right: 0;
bottom: 0;
left: 0%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0 auto;
background-color: rgba(255, 174, 0, .8);
text-align: left;
opacity: 0;
transition: opacity .7s ease-out;
}
.photo-overlay:hover {
opacity: 1;
}
.photo-overlay h3 {
font-size: 1em;
letter-spacing: 2px;
text-transform: uppercase;
margin: 5px 0;
border-bottom: 1px solid #fff;
padding-top: 10px;
padding-left: 10px;
padding-right: 10px;
padding-bottom: 15px;
}
#top-line1, #top-line2, #top-line3 {
border: none;
padding-bottom: 5px;
}
.photo-overlay p {
margin: 5px 0;
font-size: .7em;
letter-spacing: 1px;
padding-top: 5px;
}
#behind {
padding-top: 0;
margin-top: 0;
}
/******************************
PAGE:ABOUT
******************************/
.about {
display: flex;
flex-direction: column;
align-items: center;
}
.showreel {
margin-bottom: 30px;
}
.about h3,
p {
font-size: 0.8em;
font-weight: normal;
text-align: center;
letter-spacing: 1px;
line-height: 2em;
}
/******************************
PAGE:CONTACT
******************************/
.contact-info {
list-style-type: none;
text-align: center;
padding: 0;
}
.contact-info img {
border-radius: 100%;
width: 80px;
height: 80px;
}
.contact-info h3 {
text-transform: uppercase;
letter-spacing: 2px;
}
.contact-info p {
font-size: 0.8em;
line-height: 2em;
letter-spacing: 1px;
}
.contact-info li {
padding-top: 20px;
padding-bottom: 20px;
}
/******************************
PAGE:FOOTER
******************************/
footer {
font-size: 0.7em;
text-align: center;
clear: both;
padding-top: 50px;
padding-bottom: 30px;
color: white;
background-color: #222222;
margin-top: auto;
}
footer h3 {
text-transform: uppercase;
letter-spacing: 2px;
/*
text-align: center;
*/
}
.social-icon {
width: 30px;
height: 30px;
margin: 0 5px;
}
.scroll img {
height: 20px;
width: 20px;
}
.scroll {
margin-top: 20px;
}
/******************************
MEDIA QUERIES
******************************/
#media (min-width: 769px) {
.container {
max-width:85%;
margin: 80px auto;
padding: 0 10%;
}
.main-header,
.main-nav {
display: flex;
}
.main-header {
flex-direction: column;
align-items: center;
}
.main-nav {
justify-content: center;
font-size: 0.8em;
}
.feature {
font-size: .8em;
}
.name-nav {
position: absolute;
bottom: 20px;
}
h1 {
font-size: 1.5em;
}
.contact-info {
display: flex;
width: 600px;
align-content: center;
justify-content: space-between;
margin: auto;
}
.contact-info li {
flex-basis: 25%;
}
}
#media (min-width: 1025px) {
.main-image {
display: none;
}
.video-loop {
display: unset;
}
/*
.video-loop {
visibility: visible;
}
*/
.main-header {
min-height: 100%;
min-width: 100%;
}
.name-nav {
display: flex;
flex-direction: row;
justify-content: space-between;
position: absolute;
bottom: 20px;
}
.contact-info {
width: 800px;
}
.name {
padding-left: 5%;
}
.main-nav {
padding-right: 5%;
}
.about {
flex-direction: row-reverse;
justify-content: center;
align-items: center;
}
.showreel {
max-width: 50%;
margin-left:40px;
}
.info {
max-width: 40%;
margin-right: 40px;
text-align: center;
}
}
Look here: flex
Click in the tab "known issue"
- In Chrome and Safari, the height of (non flex) children are not recognized in percentages. However Firefox and IE recognize and scale the children based on percentage heights.

Why there's a wide space to the left of my site?

A very wide space to the left of the site's html appears in the browser.I don't know the reason or even when that happened.
I uploaded my site live here : http://kfs-saintgeorge.esy.es/
And here's my CSS file :
*{
box-sizing: border-box;
}
html{
direction: rtl;
background-color: #b7b7b7;
margin: 0 auto;
padding: 0;
}
img{
max-width:100%;
}
body{
width: 60%;
margin: auto;
padding: 0;
}
div{
border-radius: 10px;
}
.centering{
text-align: center;
}
#hbackground{
background: url('/images/background.jpg') no-repeat ;
background-size: cover;
display: block;
border-radius: 20px 20px 0px 0px;
margin: 10px auto;
width: 100%;
padding-top:37.01527614571093%;
}
.btop{
border-radius: 0;
height: 4px;
width: 100%;
}
#header ul{
list-style-type: none;
margin: 0;
padding: 0;
background-color: #1e7989;
font-family: hfont;
font-size: 20px;
display: flex;
justify-content: space-around;
z-index: 1;
margin:10px auto;
width: 100%;
}
#header li{
width: 9em;
height: 70px;
background-color: #1e7989;
flex: 1 1 auto;
}
#header li a{
display: block;
line-height: 70px;
}
.content {
background-color: #ffffff;
width:100%;
text-align: center;
line-height: 2em;
line-height: 50px;
}
.content p {
width: 85%;
margin:0 auto;
font-family: contentfont;
font-weight: bold;
font-size: 23px;
color:#862222;
}
a:link, a:visited{
text-decoration: none;
color:#ffffff;
}
h2{
color:#187477;
font-family: headlinefont;
font-weight: normal;
text-decoration: underline;
text-align: center;
}
.mainmenu {
cursor: pointer;
color:#ffffff;
text-align: center;
display: block;
margin-bottom: 0;
bottom: 0;
border:0;
font-size: 1em;
font-weight: bold;
width: 100%;
}
.submenu {
list-style-type: none;
padding: 0;
text-align: center;
background-color: #17243e;
margin: 0 auto;
display: none;
border-radius: 0 0 7px 7px;
}
.submenu li {
border-bottom: 2px solid white;
}
.submenu li:last-child, .submenu li:last-child a:last-child {
border-bottom: 0;
border-radius: 0 0 7px 7px;
}
.submenu a:hover {
background-color: aliceblue;
color: #000000;
}
nav{
width: 29%;
display: inline;
}
nav div{
margin-bottom: 10px;
background-color: #ffffff;
padding: 10px;
max-width: 100%;
}
#sidebar{
background-color: white;
padding: 0;
font-family: contentfont;
}
#sidebar>ul{
list-style-type: none;
margin: 0;
padding: 20px;
}
#sidebar>ul >li{
position: relative;
background-color: #1a8891;
border:2px solid #0c383a;
margin-bottom: 5px;
border-radius: 10px;
}
#sidebar a:link,#sidebar a:visited{
display: block;
position: relative;
width: 100%;
text-align: center;
line-height: 40px;
font-size: 1em;
font-weight: normal;
}
#sidebar li:hover{
background-color: #156b72;
}
#body2{
width: 100%;
display: flex;
justify-content: space-around;
align-items:flex-start;
flex-direction: row;
}
#main_content{
width: 70%;
vertical-align: top;
}
#footer{
background-color: #05333b;
width: 100%;
height: 100px;
text-align: center;
color:#ffffff;
font-family: Arial;
line-height: 20px;
border-radius: 0px;
margin: auto;
display: block;
bottom: 0;
right: 0;
}
#footer p{
position: relative;
top: 50%;
transform: translateY(-50%);
}
#cp_widget_e6374685-0d11-4dc4-9b95-04f8435cd872{
margin: 0 auto;
padding: 10px;
}
#homeImages{
background-color: white;
margin: auto;
text-align: center;
}
.mainmenu i{
position: absolute;
right: 10%;
top:10px;
vertical-align: middle;
}
#media screen and (max-width: 1200px){
body{
width: 100%;
}
header ul{
font-size: 5px;
}
}
#social{
direction: ltr;
height: auto;
margin: auto;
display: flex;
justify-content: center;
margin-bottom: 10px;
flex-wrap: wrap;
}
.social{
color:black;
padding: 3px;
}
.fb:hover{
color:#000098;
}
.yt:hover{
color: #ff0000;
}
#facebook-page{
max-width: 100%;
padding: 0;
text-align: center;
overflow: hidden;
}
.fb-page{
margin: auto;
text-align: center;
max-width: 100%;
padding: 0;
}
As far as I can see it is because
direction: rtl tag in your HTML element.
Try to put it inside #body2:
#body2 {
width: 100%;
display: flex;
justify-content: space-around;
align-items: flex-start;
flex-direction: row;
direction: rtl;
}