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

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;
}

Related

How to get border attribute to fill up 100% width of div having n padding

I have made a parent div with 25px padding. In that div, I created another li tag which has a border-top, width is 100% but it doesn't fill up the parent div. It stops at the 25px padding.
Tried border-box but that dint work too.
When I change the width of li element to 115%
* {
padding: 0;
margin: 0;
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 0;
margin: 0;
overflow: hidden;
font-family: Helvetica;
}
.dark {
background-color: #17202A;
}
section {
background-color: #1C2733;
width: 500px;
height: 300px;
border-radius: 25px;
padding: 20px;
color: white;
}
h1 {
font-size: 23px;
font-weight: 800;
letter-spacing: -0.2px;
}
ul {
margin-top: 20px;
width: 100%;
}
li {
padding-top: 10px;
padding-bottom: 10px;
align-items: center;
list-style: none;
height: 50px;
border-top: 1px solid white;
width: 115%;
margin: auto;
}
<section>
<h1>Who to follow</h1>
<ul>
<li>dsdfd</li>
<li>sdfsdf</li>
<li>sdfsdf</li>
</ul>
</section>
Required Output
This is normal behaviour for padding. You could remove the padding from the parent element and add it to the child like this:
* {
padding: 0;
margin: 0;
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 0;
margin: 0;
overflow: hidden;
font-family: Helvetica;
}
.dark {
background-color: #17202A;
}
section {
background-color: #1C2733;
width: 500px;
height: 300px;
border-radius: 25px;
padding: 0;
color: white;
}
h1 {
font-size: 23px;
font-weight: 800;
padding: 20px 20px 0;
letter-spacing: -0.2px;
}
ul {
margin-top: 20px;
width: 100%;
}
li {
padding: 10px 20px;
align-items: center;
list-style: none;
height: 50px;
border-top: 1px solid white;
width: 100%;
margin: auto;
}
<section>
<h1>Who to follow</h1>
<ul>
<li>dsdfd</li>
<li>sdfsdf</li>
<li>sdfsdf</li>
</ul>
</section>
li {
align-items: center;
list-style: none;
height: 50px;
border-top: 1px solid white;
width: auto;
margin: 0 -20px;
padding: 10px;
}
Do the following steps
Remove padding from section class.
Add padding to h2 and li components.
Remove width property of li, let it take 100% width by
default
*{
padding:0;
margin:0;
}
body{
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 0;
margin: 0;
overflow: hidden;
font-family:Helvetica;
}
.dark{
background-color: #17202A;
}
section{
background-color:#1C2733;
width:500px;
height:300px;
border-radius:25px;
color:white;
}
h1{
font-size:23px;
font-weight:800;
letter-spacing:-0.2px;
padding: 20px;
}
ul{
margin-top:20px;
width:100%;
}
li{
padding-top:10px;
padding-bottom:10px;
align-items:center;
list-style:none;
height:50px;
border-top: 1px solid white;
margin:auto;
padding: 20px;
}
<body class="dark">
<section>
<h1>Who to follow</h1>
<ul>
<li>dsdfd</li>
<li>sdfsdf</li>
<li>sdfsdf</li>
</ul>
</section>
</body>
* {
padding: 0;
margin: 0;
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 0;
margin: 0;
overflow: hidden;
font-family: Helvetica;
}
.dark {
background-color: #17202A;
}
section {
background-color: #1C2733;
width: 500px;
height: 300px;
border-radius: 25px;
padding: 0;
color: white;
}
h1 {
font-size: 23px;
font-weight: 800;
padding: 20px 20px 0;
letter-spacing: -0.2px;
}
ul {
margin-top: 20px;
width: 100%;
}
li {
padding: 10px 20px;
align-items: center;
list-style: none;
height: 50px;
border-top: 1px solid white;
width: 100%;
margin: auto;
}
<section>
<h1>Who to follow</h1>
<ul>
<li>dsdfd</li>
<li>sdfsdf</li>
<li>sdfsdf</li>
</ul>
</section>
You can do that many ways but based your code you do that easily by use negative margin and remove width property:
* {
padding: 0;
margin: 0;
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 0;
margin: 0;
overflow: hidden;
font-family: Helvetica;
}
.dark {
background-color: #17202A;
}
section {
background-color: #1C2733;
width: 500px;
height: 300px;
border-radius: 25px;
padding: 20px;
color: white;
}
h1 {
font-size: 23px;
font-weight: 800;
letter-spacing: -0.2px;
}
ul {
margin-top: 20px;
width: 100%;
}
li {
align-items: center;
list-style: none;
height: 50px;
border-top: 1px solid white;
padding:10px 20px;
margin: auto;
margin-left:-20px; /* value equivalent of `padding` left side applied parent container */
margin-right:-20px; /* value equivalent of `padding` right side applied parent container */
}
<section>
<h1>Who to follow</h1>
<ul>
<li>dsdfd</li>
<li>sdfsdf</li>
<li>sdfsdf</li>
</ul>
</section>
li {
border-top: 1px solid white;
display: block;
height: 50px;
margin: 0 -20px;
padding: 10px 10px;
}

Is there any solution about print preview problem in IE9?

Nice to meet you.
I'm making a confirmation screen by using html5 and css3 (I also use bootstrap). Suddenly I have to apply it in IE9 and be able to print it. I thought I've solved about this problem, but it doesn't work well in actual IE9.
In IE9 print preview, they rendered 100pages. It doesn't seem to depend on the length of the pages.
Is there anybody who experienced this situation?
How did you solve it?
Thank you for reading,
Karen
I tried to make print.css and wrote the link
<href="css/print.css" rel="stylesheet" media="print">
##print.css##
body{width: 90%; height: auto; overflow: hidden;}
h3 {margin-bottom: 20px;}
.container-bottom{display: none;}
.logout{display: none;}
header{display: none;}
.confirmation-btn-wrap{display: none;}
footer{display: none;}
.description-txt{display: none;}
.contents{margin: 0;}
.container{margin: 0 auto; height: auto;}
.printBlock {page-break-before: always; margin-bottom: 0;}
.printBlock::after {page-break-before: always; margin-bottom: 0;}
.form-contents{padding: 0px;}
##original css##
.body{
top: 0;
position: absolute;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.contents{
width: 799px;
margin: 40px auto 40px auto;
}
h3{
margin-bottom: 30px;
}
header{
background-image: url("../../../public/img/header.png");
min-width: 100%;
height: 139px;
border-bottom: solid 10px #B5D436;
background-repeat: no-repeat;
background-position: center;
}
.col-xs-4 p{
border-left: solid 5px #B5D436;
padding-left: 10px;
margin: 0;
font-weight:700;
}
.col-xs-8 p{
line-height:140%;
}
.btn-primary-large---extend{
color: #fff;
background-color: #B5D436;
font-size: 18px;
font-weight: 700;
}
.btn-primary---extend{
color: #fff;
background-color: #B5D436;
font-size: 18px;
font-weight: 700;
}
.form-btn{
width: 297px;
height: 50px;
background-color: #B5D436;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin-left: auto;
margin-right: auto;
}
.form-btn-blue{
color: #fff!important;
font-size: 18px;
font-weight: 700;
width: 458px;
height: 50px;
background-color: #4EDAF6;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin-left: auto;
margin-right: auto;
text-decoration: none;
border-radius: 4px;
}
.form-btn-blue a,
a:hover,
a:focus,
a:visited, {
text-decoration: none!important;
}
.btn-wrap{
margin-bottom: 30px;
}
.btn{
background-color: #B5D436;
width: 267px;
height: 50px;
color: #ffffff;
font-size: 18px;
font-weight: bold;
}
.container-narrow{
background-color:#F1FFBA;
width: 100%;
}
.container-narrow .wrap{
width: 799px;
padding: 40px 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-left: auto;
margin-right: auto;
align-items: center;
}
.confirmation-btn-wrap .alert-info---extend p {
text-align: left;
}
.btn-print{
width: 180px;
height: 35px;
background-color: #B5D436;
color: #ffffff;
font-size: 16px;
font-weight: 400;
margin-top: 20px;
}
.circle{
width: 116px;
height: 116px;
background-color: #FFFFFF;
border-radius: 50%;
text-align: center;
padding: 35px 0 0 0;
margin: 0px 40px 0 0;
line-height: 24px;
vertical-align: middle;
}
footer .between{
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: flex-end;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.form-signin-boothForm {
width: 761px;
margin: 0 auto 40px auto;
background-color: #F9F9F9;
padding: 40px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.form-signin-boothForm p small{
margin-bottom: 0;
}
.form-signin-boothForm h3{
text-align: left;
padding-left: 10px;
margin-bottom: 40px;
}
.form-signin-boothForm-wrap{
margin-left: auto;
margin-right: auto;
width: 460px;
text-align: center;
}
.form-signin-boothForm input[type="text"]{
font-size: 16px;
height: auto;
margin: 10px auto 30px auto;
padding: 7px 9px;
width: 460px;
display: block;
}
.form-signin-boothForm input[type="password"] {
font-size: 16px;
height: auto;
margin: 10px auto 40px auto;
padding: 7px 9px;
width: 460px;
display: block;
}
.form-signin-boothForm p{
width: 460px;
text-align: left;
margin-left: auto;
margin-right: auto;
}
.form-password{
padding: 20px 25px 30px 25px;
background-color: #F9F9F9;
font-size: 16px;
margin: 20px 0 0 0;
overflow: hidden;
}
.form-password h3{
font-size: 18px;
margin-bottom: 20px;
text-align: left;
padding-left: 10px;
}
.alert-info---extend {
color: #707070;
background-color: #FFFFFF;
border:solid 1px #D2D2D2;
padding:20px;
margin: 20px 0 40px 0;
}
.alert-info---extend p{
font-size: 14px;
line-height: 180%;
}
.alert-attention {
color: #707070;
padding: 0px 40px 0 40px;
}
.alert-attention p{
font-size: 14px;
line-height: 20px;
}
.logout{
width: 799px;
margin-left: auto;
margin-right: auto;
margin-top: 40px;
text-align: right;
}
.logout .btn---extend{
background-color: #707070;
width: 100px;
height: 30px;
color: #ffffff;
font-size: 13px;
font-weight: bold;
}
.attention{
padding: 20px;
width: 799px;
margin-left: auto;
margin-right: auto;
}
.attention p{
text-align: left;
font-size: 14px;
}
.form-signin {
max-width: 716px;
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin input[type="text"],
.form-signin input[type="password"] {
font-size: 16px;
height: auto;
margin-bottom: 15px;
padding: 7px 9px;
}```

How do I achieve this layout with CSS?

I have some Javascript pulling information from a database for various films, but the layout of the page is dreadful, I want to achieve something similar to the layout in the screenshot below:
but this is how it looks right now:
How would I go about achieving a layout similar to the one in the top image?
Here is my code (tweaked so you can see content, though the divs would actually be empty without the database usually)
#import url(https://fonts.googleapis.com/css?family=Raleway);
body {
margin: 0;
font-family: 'Raleway', georgia, arial;
background-color: #e0e0e0;
text-align: center;
}
h1 {
color: #aaaaaa;
text-align: left;
}
.sortFilms {
text-align: left;
display: inline-block;
background-color: #ff6699;
width: 80%;
padding: 20px;
}
header {
text-align: center;
display: inline-block;
border-bottom: 5px;
border-top: 0;
border-left: 0;
border-right: 0;
border-style: solid;
border-color: #aaaaaa;
width: 80%;
padding: 20px;
background-color: #e0e0e0;
}
.newFilm {
text-align: left;
display: inline-block;
background-color: #ff6699;
width: 80%;
padding: 20px;
}
label {
font-size: 1em;
padding: 6px;
color: #fff;
font-weight: 700;
display: block;
text-align: left;
}
.form {
margin: auto;
display: flex;
text-align: center;
flex-direction: column;
}
h2 {
font-weight: 700;
font-size: 2em;
width: 50%;
color: #B2365F;
}
#formTitle {
margin-top: 0;
margin-bottom: 0;
}
.row {
margin-left: -20px;
display: grid;
grid-template-columns: 1fr 1fr;
}
.col {
padding: 20px;
}
input,
textarea, select {
width: 100%;
display: block;
border-radius: 25px;
background-color: #e0e0e0;
padding: 10px;
border: none;
box-sizing:border-box; }
}
.tagline {
margin: 0;
color: #333333;
font-size: 1em;
font-weight: 700;
}
input::placeholder {
color: #000;
}
textarea::placeholder {
color: #000;
}
#modifyFilmButton {
float: right;
}
#media only screen and (max-width: 700px) {
.row {
grid-template-columns: 1fr;
}
}
#media screen and (max-width:800px) {
table {
border: 0;
}
table caption {
font-size: 1.3em;
}
table thead {
border: none;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
table tr {
border: 2px solid #e0e0e0;
background-color: #e0e0e0;
display: block;
margin-bottom: .625em;
border-radius: 20px;
}
table td {
display: block;
font-weight: bold;
font-size: 1.2em;
text-align: left;
padding: 15px;
}
table td::before {
/*
* aria-label has no advantage, it won't be read inside a table
content: attr(aria-label);
*/
content: attr(data-label);
float: left;
font-weight: bold;
text-transform: uppercase;
}
table td:last-child {
border-bottom: 0;
}
}
.oldFilm {
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
text-align: left;
display: inline-block;
background-color: #AAAAAA;
width: 80%;
padding: 20px;
}
#oldTitle {
margin-top: 0;
margin-bottom: 0;
color: #ff6699;
padding-bottom: 20px;
}
td {
padding: 5px;
font-weight: bold;
}
table {
border-collapse: collapse;
text-align: center;
width: 100%;
}
thead {
background: #ff6699;
}
.reviewImage {
width: 200px;
border-radius: 20px;
}
.filmRow img {
width: 300px;
height: 420px;
margin: 10px;
border-radius: 20px;
}
.filmRow {
-webkit-flex-flow: row wrap;
justify-content: space-around;
}
#filmContainer {
width: 100%;
margin-top: 10px;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-around;
}
#date {
padding: 5px;
text-align: left;
width: 30%;
}
#date input {
width: auto;
}
#date label {
display: -webkit-inline-box;
}
#oldTitle2 {
margin-top: 0;
margin-bottom: 0;
color: #ff6699;
}
.genre {
padding: 5px;
text-align: left;
width: 60%;
}
.genre input {
width:auto;
}
.genre label {
display: -webkit-inline-box;
}
/* third page */
#filmImage {
width: 300px;
height: 420px;
margin: 10px;
border-radius: 20px;
}
#filmTitle {
font-weight: 700;
margin: 0;
font-size: 3em;
width: 100%;
text-align: center;
color: #B2365F;
}
<header>
<img src="img/rv-logo.png">
<p class="tagline">Want to know whether or not it's worth paying to watch a certain film or not? See what we think first!</p>
</header>
<div class="sortFilms">
<div id="filmContainer">
<img id='filmImage'src="https://images-na.ssl-images-amazon.com/images/I/51Gh9OaWVcL.jpg">
<p id='filmTitle'>Deadpool</p>
<label>Year:</label><p id='filmYear'>2016</p>
<label>Genre:</label><p id='filmGenre'>Comedy</p>
<label>Rating:</label><p id='filmRating'>9</p>
<label>Synopsis:</label><p id='filmSynopsis'>Just Ryan Reynolds, doing Ryan Reynolds things in a tight suit.</p>
<a href='viewFilms.html'>Back to list</a>
</div>
</div>
(ignore the font on the text in the ideal layout, I just used the last one I used on Photoshop)
Any help would be greatly appreciated.
try separate the image and the text in the different div.
make two column, and adjust the width accordingly with the CSS.
<div id="filmContainer">
<div id="leftcolumn">
<img id='filmImage'src="https://images-na.ssl-images-amazon.com/images/I/51Gh9OaWVcL.jpg">
</div>
<div id="rightcolumn">
<p id='filmTitle'>Deadpool</p>
<label>Year:</label><p id='filmYear'>2016</p>
<label>Genre:</label><p id='filmGenre'>Comedy</p>
<label>Rating:</label><p id='filmRating'>9</p>
<label>Synopsis:</label><p id='filmSynopsis'>Just Ryan Reynolds, doing Ryan Reynolds things in a tight suit.</p>
<a href='viewFilms.html'>Back to list</a>
</div>
</div>
First, you should convert most, of not all your IDs to CLASS tags. You don't need to make them all ID and then it limits you from having multiple movie cards on one page.
Where's a JSfiddle I created for you, updating the html a little and mostly the CSS.
HTML:
<header>
<img src="img/rv-logo.png">
<p class="tagline">Want to know whether or not it's worth paying to watch a certain film or not? See what we think first!</p>
</header>
<div class="sortFilms">
<div id="filmContainer">
<div class="poster">
<img id='filmImage'src="https://images-na.ssl-images-amazon.com/images/I/51Gh9OaWVcL.jpg">
</div>
<div class="info">
<p id='filmTitle'>Deadpool</p>
<label>Year:</label><p id='filmYear'>2016</p>
<label>Genre:</label><p id='filmGenre'>Comedy</p>
<label>Rating:</label><p id='filmRating'>9</p>
<label>Synopsis:</label><p id='filmSynopsis'>Just Ryan Reynolds, doing Ryan Reynolds things in a tight suit.</p>
<a href='viewFilms.html'>Back to list</a>
</div>
</div>
</div>
CSS (All of your original CSS is in there too, which could be cleaned up):
#import url(https://fonts.googleapis.com/css?family=Raleway);
body {
margin: 0;
font-family: 'Raleway', georgia, arial;
background-color: #e0e0e0;
text-align: center;
}
h1 {
color: #aaaaaa;
text-align: left;
}
.sortFilms {
text-align: left;
display: inline-block;
background-color: #ff6699;
width: 80%;
padding: 20px;
}
header {
text-align: center;
display: inline-block;
border-bottom: 5px;
border-top: 0;
border-left: 0;
border-right: 0;
border-style: solid;
border-color: #aaaaaa;
width: 80%;
padding: 20px;
background-color: #e0e0e0;
}
.newFilm {
text-align: left;
display: inline-block;
background-color: #ff6699;
width: 80%;
padding: 20px;
}
label {
font-size: 1em;
padding: 6px;
color: #fff;
font-weight: 700;
display: block;
text-align: left;
}
.form {
margin: auto;
display: flex;
text-align: center;
flex-direction: column;
}
h2 {
font-weight: 700;
font-size: 2em;
width: 50%;
color: #B2365F;
}
#formTitle {
margin-top: 0;
margin-bottom: 0;
}
.row {
margin-left: -20px;
display: grid;
grid-template-columns: 1fr 1fr;
}
.col {
padding: 20px;
}
input,
textarea, select {
width: 100%;
display: block;
border-radius: 25px;
background-color: #e0e0e0;
padding: 10px;
border: none;
box-sizing:border-box; }
}
.tagline {
margin: 0;
color: #333333;
font-size: 1em;
font-weight: 700;
}
input::placeholder {
color: #000;
}
textarea::placeholder {
color: #000;
}
#modifyFilmButton {
float: right;
}
#media only screen and (max-width: 700px) {
.row {
grid-template-columns: 1fr;
}
}
#media screen and (max-width:800px) {
table {
border: 0;
}
table caption {
font-size: 1.3em;
}
table thead {
border: none;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
table tr {
border: 2px solid #e0e0e0;
background-color: #e0e0e0;
display: block;
margin-bottom: .625em;
border-radius: 20px;
}
table td {
display: block;
font-weight: bold;
font-size: 1.2em;
text-align: left;
padding: 15px;
}
table td::before {
/*
* aria-label has no advantage, it won't be read inside a table
content: attr(aria-label);
*/
content: attr(data-label);
float: left;
font-weight: bold;
text-transform: uppercase;
}
table td:last-child {
border-bottom: 0;
}
}
.oldFilm {
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
text-align: left;
display: inline-block;
background-color: #AAAAAA;
width: 80%;
padding: 20px;
}
#oldTitle {
width:100%;
margin-top: 0;
margin-bottom: 0;
color: #ff6699;
padding-bottom: 20px;
}
td {
padding: 5px;
font-weight: bold;
}
table {
border-collapse: collapse;
text-align: center;
width: 100%;
}
thead {
background: #ff6699;
}
.reviewImage {
width: 200px;
border-radius: 20px;
}
.filmRow img {
width: 300px;
height: 420px;
margin: 10px;
border-radius: 20px;
}
.filmRow {
-webkit-flex-flow: row wrap;
justify-content: space-around;
}
#filmContainer {
width: 100%;
margin-top: 10px;
display: block;
position: relative;
flex-wrap: wrap;
align-items: center;
justify-content: space-around;
}
#filmContainer .poster {
width:45%;
float:left;
}
#filmContainer .info {
width:50%;
float: right;
}
#filmContainer .info label {
float:left;
width: 25%;
padding:0;
margin: 5px 0;
}
#filmContainer .info p {
float:left;
width: 75%;
margin: 5px 0;
}
#filmContainer .info a {
display:block;
padding: 25px 0;
clear:both;
}
#filmContainer .info p#filmTitle {
width:100%;
clear:both;
margin-top: 0;
margin-bottom: 0;
padding-bottom: 20px;
float: unset;
text-align:left;
}
#date {
padding: 5px;
text-align: left;
width: 30%;
}
#date input {
width: auto;
}
#date label {
display: -webkit-inline-box;
}
#oldTitle2 {
margin-top: 0;
margin-bottom: 0;
color: #ff6699;
}
.genre {
padding: 5px;
text-align: left;
width: 60%;
}
.genre input {
width:auto;
}
.genre label {
display: -webkit-inline-box;
}
/* third page */
#filmImage {
width: 95%;
height: auto;
margin: 10px;
border-radius: 20px;
}
#filmTitle {
font-weight: 700;
margin: 0;
font-size: 3em;
width: 100%;
text-align: center;
color: #B2365F;
}
http://jsfiddle.net/sstracy/vaq60zyp/

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.