How to add margin to an HTML element? - html

https://jsfiddle.net/mp3ajvrL/
I'm trying to add a margin between the list element "contact us" and the h3 element with the text "Functional and Non-Functional Requirements". However, I am not able to do this. It looks like the h3 element covers the whole list somehow, so that the margin-top: 10px css will only add a margin above the list. Any tips?
body {
background-color: #333333;
margin: auto;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: white;
}
#navbar {
width: 100%;
width: 100%;
float: left;
margin: 0 0 1em 0;
padding: 0;
background-color: #f2f2f2;
border-bottom: 1px solid #ccc;
}
.header {
font-size: 1em;
margin-bottom: 5%;
}
h2 {
font-size: 1em;
text-align: left;
padding-left: 2%;
margin-bottom: -1em;
}
h5 {
text-align: center;
}
h3 {
text-align: left;
padding-left: 2%;
font-size: 1.4em;
color: white;
margin-bottom: 0;
margin-top: 0;
}
p,
ul,
ol {
font-size: 1.2em;
line-height: 130%;
width: auto;
text-align: left;
padding-left: 2%;
}
p ol {
padding-left: 10%;
padding-bottom: 2%;
}
p ol li {
margin-bottom: 10px;
}
p {
float: left;
margin-bottom: 40px;
margin-top: 0.1em;
}
#cover {
width: 100%;
}
.intro .facts .bibliography {
min-width: 65ch;
max-width: 75ch;
}
#container {
position: relative;
text-align: center;
color: white;
}
#cover {
position: relative;
width: 100%;
}
#headingOnPicture {
position: relative;
}
#textOverImage {
position: absolute;
bottom: 0;
left: 2%;
}
#media only screen and (max-width: 1122px) {
#textOverImage {}
}
#media only screen and (max-width: 800px) {
#textOverImage {}
}
#navbar ul {
display: inline-block;
overflow: hidden;
list-style-type: none;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
display: inline-block;
list-style-type: none;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
padding: 15px;
margin: auto;
}
ol {
padding-left: 5%;
}
ol li {
margin: 0.5%;
}
#center {
margin: auto;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: white;
padding-left: 5%;
padding-right: 5%;
}
* {
box-sizing: border-box;
}
body {
font: 300 100% 'Helvetica Neue', Helvetica, Arial;
}
.four {
width: 60;
}
.four a {
width: 60px;
}
.container {
width: 20%;
margin: 0 auto;
}
ul li {
display: inline;
text-align: center;
}
a {
display: inline-block;
width: 25%;
padding: .75rem 0;
margin: 0;
text-decoration: none;
color: #333;
font-size: 20px;
}
.one:hover~hr {
opacity: 1;
margin-left: 5%;
}
.two:hover~hr {
opacity: 1;
margin-left: 28%;
}
.three:hover~hr {
opacity: 1;
margin-left: 52%;
}
.four:hover~hr {
opacity: 1;
margin-left: 75%;
}
hr {
margin-left: 0%;
opacity: 0.1;
height: .25rem;
width: 25%;
margin: 0;
background: tomato;
border: none;
transition: .3s ease-in-out;
}
li b {
color: powderblue;
}
p {
float: left;
}
.mainPart {
width: 80%;
padding-left: 20%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="styling.css">
</head>
<body>
<div class="container">
<ul>
<li class="one">P1</li>
<!--
-->
<li class="two">P2</li>
<!--
-->
<li class="three">P3</li>
<!--
-->
<li class="four">P4</li>
<hr />
</ul>
</div>
<div id="container">
<header id="headingOnPicture">
<img id="cover" src="mountains.jpg" alt="Cover image" />
<h1 id="textOverImage">P1: Requirements</h1>
</header>
<div class="header">
<div>
<div> // 18. September 2019
</div>
</div>
</div>
<div class="mainPart">
<h3>
Administrative Details
</h3>
<p>
Antikvariatet is a cozy bar/pub/café/venue located at Bakklandet in Trondheim. It offers a great assortment of beers as well as outside serving. The inside of Antikvariatet consists of two separated areas. One offers a calm, laid-back atmosphere while
the other hosts various kinds of events. The events ranges from small concerts and standup comedy to cultural performances and social debates.
</p>
<h3>Purpose and goals</h3>
<p>
The main purpose of this website is to inform customers about events happening at Antikvariatet. The business goal is to increase the amount of visitors to the venue. This means that the "event" section of the website needs to stand out. In addition,
special offers also need to be clearly communicated. The website has to capture the cozy atmosphere Antikvariatet offers.
</p>
<br>
<div>
<h3>Audience</h3>
<p>
The intended user is in the age group 18 to 60. These customers tend to use the internet more for looking up information about the venue.
</p>
<br>
<br>
</div>
<div class="content">
<h3>
The content of the site and how it is organized
</h3>
<h2> The major sections of the website:</h2>
</div>
<br>
<ol>
<li><b>About us: </b> Consists of the general information about Antikvariatet. What the concept is and what they offer.</li>
<li><b>Menu: </b>Should provide the menu for the restaurant and the selection of beers in the bar.</li>
<li><b>Events: </b>Events consists of three subcategories the customer can choose between if desired. The subcategories are «Cultural events», «Sosial events» and «Concerts». The customer can also just scroll down and see the unfiltered list of events.
A «Search for event or concert» - should also appear with a search bar. Next to the event there should be a button to sign up for the event.</li>
<li><b>Picures: </b>This should consists of pictures showing the cozy atmosphere and the different things they offer. It could also have an Instagram part consisting of pictures taken by customers and tagged with «Antikvariatet».</li>
<li><b>Contact us: </b>Should contain the information about where they are located with a map, the opening hours, the mail to contact them and the telephone number.</li>
</ol>
<div>
<h3>
Functional and Non-Functional Requirements
</h3>
<h2>
Non-functional:
</h2>
<br>
<p>
Due to the large age difference of the clientele, the website should and be easy and intuitive also for users with low technology experience. The appearance of the website should reflect the warm and welcoming environment that Antikvariatet provide. The
webside should be effective, and all functionalities should react within a second.
</p>
<h2>
Functional:
</h2>
<br>
<p>
The customers should easily be provided a menu for the café. They should also able to make and send in orders for the different events. The website should provide a calendar for all the events. One should be able to click on a date and see happenings
on that day, and also all happenings over a longer periode. For better usability, the customer should be able to divide the different events in smaller groups; concerts, social events or cultural activities and be able to search for events.
The customer should also be able to press a button and get the website in English instead of Norwegian.
</p>
</div>
<h3>Final location:</h3>
<p>
We have not yet been in touch with Antikvariatet about making an actual website for them. Howerver, the website will be hosted at one of our folk.ntnu servers.
</p>
</div>
</div>
</body>
</html>

Get rid of the rule:
li {
float: left;
}
body {
background-color: #333333;
margin: auto;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: white;
}
#navbar {
width: 100%;
width: 100%;
float: left;
margin: 0 0 1em 0;
padding: 0;
background-color: #f2f2f2;
border-bottom: 1px solid #ccc;
}
.header {
font-size: 1em;
margin-bottom: 5%;
}
h2 {
font-size: 1em;
text-align: left;
padding-left: 2%;
margin-bottom: -1em;
}
h5 {
text-align: center;
}
h3 {
text-align: left;
padding-left: 2%;
font-size: 1.4em;
color: white;
margin-bottom: 0;
margin-top: 0;
}
p,
ul,
ol {
font-size: 1.2em;
line-height: 130%;
width: auto;
text-align: left;
padding-left: 2%;
}
p ol {
padding-left: 10%;
padding-bottom: 2%;
}
p ol li {
margin-bottom: 10px;
}
p {
float: left;
margin-bottom: 40px;
margin-top: 0.1em;
}
#cover {
width: 100%;
}
.intro .facts .bibliography {
min-width: 65ch;
max-width: 75ch;
}
#container {
position: relative;
text-align: center;
color: white;
}
#cover {
position: relative;
width: 100%;
}
#headingOnPicture {
position: relative;
}
#textOverImage {
position: absolute;
bottom: 0;
left: 2%;
}
#media only screen and (max-width: 1122px) {
#textOverImage {}
}
#media only screen and (max-width: 800px) {
#textOverImage {}
}
#navbar ul {
display: inline-block;
overflow: hidden;
list-style-type: none;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
display: inline-block;
list-style-type: none;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
padding: 15px;
margin: auto;
}
ol {
padding-left: 5%;
}
ol li {
margin: 0.5%;
}
#center {
margin: auto;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: white;
padding-left: 5%;
padding-right: 5%;
}
* {
box-sizing: border-box;
}
body {
font: 300 100% 'Helvetica Neue', Helvetica, Arial;
}
.four {
width: 60;
}
.four a {
width: 60px;
}
.container {
width: 20%;
margin: 0 auto;
}
ul li {
display: inline;
text-align: center;
}
a {
display: inline-block;
width: 25%;
padding: .75rem 0;
margin: 0;
text-decoration: none;
color: #333;
font-size: 20px;
}
.one:hover~hr {
opacity: 1;
margin-left: 5%;
}
.two:hover~hr {
opacity: 1;
margin-left: 28%;
}
.three:hover~hr {
opacity: 1;
margin-left: 52%;
}
.four:hover~hr {
opacity: 1;
margin-left: 75%;
}
hr {
margin-left: 0%;
opacity: 0.1;
height: .25rem;
width: 25%;
margin: 0;
background: tomato;
border: none;
transition: .3s ease-in-out;
}
li b {
color: powderblue;
}
p {
float: left;
}
.mainPart {
width: 80%;
padding-left: 20%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="styling.css">
</head>
<body>
<div class="container">
<ul>
<li class="one">P1</li>
<!--
-->
<li class="two">P2</li>
<!--
-->
<li class="three">P3</li>
<!--
-->
<li class="four">P4</li>
<hr />
</ul>
</div>
<div id="container">
<header id="headingOnPicture">
<img id="cover" src="mountains.jpg" alt="Cover image" />
<h1 id="textOverImage">P1: Requirements</h1>
</header>
<div class="header">
<div>
<div> // 18. September 2019
</div>
</div>
</div>
<div class="mainPart">
<h3>
Administrative Details
</h3>
<p>
Antikvariatet is a cozy bar/pub/café/venue located at Bakklandet in Trondheim. It offers a great assortment of beers as well as outside serving. The inside of Antikvariatet consists of two separated areas. One offers a calm, laid-back atmosphere while
the other hosts various kinds of events. The events ranges from small concerts and standup comedy to cultural performances and social debates.
</p>
<h3>Purpose and goals</h3>
<p>
The main purpose of this website is to inform customers about events happening at Antikvariatet. The business goal is to increase the amount of visitors to the venue. This means that the "event" section of the website needs to stand out. In addition,
special offers also need to be clearly communicated. The website has to capture the cozy atmosphere Antikvariatet offers.
</p>
<br>
<div>
<h3>Audience</h3>
<p>
The intended user is in the age group 18 to 60. These customers tend to use the internet more for looking up information about the venue.
</p>
<br>
<br>
</div>
<div class="content">
<h3>
The content of the site and how it is organized
</h3>
<h2> The major sections of the website:</h2>
</div>
<br>
<ol>
<li><b>About us: </b> Consists of the general information about Antikvariatet. What the concept is and what they offer.</li>
<li><b>Menu: </b>Should provide the menu for the restaurant and the selection of beers in the bar.</li>
<li><b>Events: </b>Events consists of three subcategories the customer can choose between if desired. The subcategories are «Cultural events», «Sosial events» and «Concerts». The customer can also just scroll down and see the unfiltered list of events.
A «Search for event or concert» - should also appear with a search bar. Next to the event there should be a button to sign up for the event.</li>
<li><b>Picures: </b>This should consists of pictures showing the cozy atmosphere and the different things they offer. It could also have an Instagram part consisting of pictures taken by customers and tagged with «Antikvariatet».</li>
<li><b>Contact us: </b>Should contain the information about where they are located with a map, the opening hours, the mail to contact them and the telephone number.</li>
</ol>
<div>
<h3>
Functional and Non-Functional Requirements
</h3>
<h2>
Non-functional:
</h2>
<br>
<p>
Due to the large age difference of the clientele, the website should and be easy and intuitive also for users with low technology experience. The appearance of the website should reflect the warm and welcoming environment that Antikvariatet provide. The
webside should be effective, and all functionalities should react within a second.
</p>
<h2>
Functional:
</h2>
<br>
<p>
The customers should easily be provided a menu for the café. They should also able to make and send in orders for the different events. The website should provide a calendar for all the events. One should be able to click on a date and see happenings
on that day, and also all happenings over a longer periode. For better usability, the customer should be able to divide the different events in smaller groups; concerts, social events or cultural activities and be able to search for events.
The customer should also be able to press a button and get the website in English instead of Norwegian.
</p>
</div>
<h3>Final location:</h3>
<p>
We have not yet been in touch with Antikvariatet about making an actual website for them. Howerver, the website will be hosted at one of our folk.ntnu servers.
</p>
</div>
</div>
</body>
</html>
If you need to float some other set of list items then change the selector to be more specific and target only those list items, not all of them.

Related

The navigation bar of my website does not show on some browsers

I have used a pretty standard code to create a navigation bar on my website www.alexanderpopov.org. I am using a css, and it shows nicely on my work computer. The problem is that on many computers/browsers, the navigation bar disappears, and all you see is the different categories in a line, without space and without the black background. I have a very basic knowledge of html and the problem is totally mystifying to me. I paste the script below; very grateful for any advice! Alex
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Alexander Popov — Home</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
<!-- Load an icon library to show a hamburger menu (bars) on small screens -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<!-- Back to top button -->
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<script>
//Get the button
var mybutton = document.getElementById("myBtn");
// When the user scrolls down 200px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<!-- Main Container -->
<div class="container">
<!-- Header -->
<header class="header">
<div class="topnav" id="myTopnav"> Home Selected Publications Published Research Working Papers Personal Curriculum Vitae <i class="fa fa-bars"></i> </div>
<script>
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
</header>
<!-- Hero Section -->
<section class="intro">
<div class="column"> <img src="images/profile.png" alt="" class="profile"> </div>
<div class="column">
<h3>Alexander A. Popov</h3>
<p>PhD, <em>University of Chicago</em> <br>
Research Adviser, <em>European Central Bank</em><br>
Research Fellow, <em>CEPR Financial Economics & CEPR Monetary Economics</em></p>
</div>
</section>
<!-- Starts Content Section -->
<div class="content">
<h3>Intro</h3>
<p>I am a research economist, at the <em>European Central Bank</em> since 2007. </p>
<p>I am also a <em>CEPR Research Fellow</em>, both in the <em style="">Financial Economics Programme</em> and in the <em>Monetary Economics and Fluctuations Programme</em>.</p>
<p>My areas of interest are:
<ul>
<li>finance, growth, and risk;</li>
<li>banks and the real economy;</li>
<li>finance and politics;</li>
<li>finance and labor.</li>
</ul>
</p>
<p>My work has been published in top journals in both economics and finance, such as <em>American Economic Journal: Macroeconomics, Journal of International Economics</em> (2x), <em>Journal of Development Economics, Journal of Financial Economics, Review of Financial Studies</em> (2x), <em>American Economic Review Papers & Proceedings</em>, and <em>European Economic Review</em>.</p>
<p>My research papers have been presented in top academic conferences in economics, such as <em>AEA</em> (3x), <em>AFA</em> (2x), <em>Darden International Finance</em> (2x), <em>ECB/CEPR Labor Market Workshop</em> (2x), <em>Econometric Society World Congress, EEA</em> (3x), <em style="">EFA</em> (7x), <em>FIRS</em> (2x), <em>Lenzerheide</em>, <em>RES</em> (3x), <em>SED</em>, <em style="">Utah Finance</em>, and <em>WFA</em> (2x).</p>
<p>My research has been cited by the <em>Economist, Bloomberg, Financial Times</em>, and <em>Frankfurter Allgemeine Zeitung</em>, as well as received <em>Best Paper Awards</em> from the <em>Review of Finance</em>, the <em>Australasian Conference on Banking and Finance</em>, and the <em>Cass Business School Emerging Markets Finance Conference</em>.</p>
<p>I have taught an undergraduate course in <em>econometrics</em> at the <em>University of Chicago</em> and a graduate course in <em>corporate finance theory</em> at <em>Tilburg University</em>.</p>
<p>In the <em>RePEc</em> ranking, I am ranked in the <strong>top 1% in the world in the past 10 years</strong>, and in the top 100 in Europe.</p>
<p>Disclaimer: This is my personal website. The opinions expressed here do not represent the views of the <em>ECB</em> or the <em>Eurosystem</em>.</p>
<h3>Recent</h3>
<p><strong>December 2021:</strong> <em>The Economist</em> featured my recent paper Carbon Taxes and the Geography of Fossil Lending with Luc Laeven to make the case for a global - as opposed to a piecemeal - carbon tax.</p>
<p><strong>October 2021:</strong> I joined the <em>Monetary Economics and Fluctuations Program</em> and the <em>Financial Economics Program</em> of the <em>CEPR</em> as a Research Fellow.</p>
<p><strong>May 2021:</strong> <em>Political Cycles in Bank Lending to the Government</em> (with Michael Koetter) was published in the <em>Review of Financial Studies</em>.</p>
<p><strong>November 2020:</strong> My discussion of Orkun Saka's <em>Domestic Banks As Lightning Rods? Home Bias and Information during the Eurozone Crisis</em> was published in the <em>Journal of Money, Credit, and Banking</em>.</p>
<p><strong>October 2020:</strong> <em>Debt Overhang, Global Growth Opportunities, and Investment</em> (with Francesca Barbiero and Marcin Wolski) was published in the <em>Journal of Banking & Finance</em>.</p>
<p><strong>December 2019:</strong> <em>On the Link Between the Volatility and Skewness of Growth</em> (with Geert Bekaert) was published in the <em>IMF Economic Review</em>.</p>
<p><strong>October 2019:</strong> <em>The Invisible Hand of the Government: Moral Suasion During the Sovereign Debt Crisis</em> (with Steven Ongena and Neeltje Van Horen) was published in the <em>American Economic Journal: Macroeconomics</em>.</p>
<p><strong>June 2019:</strong> <em>Credit Market Competition and the Gender Gap in Labor Force Participation: Evidence from Local Labor Markets</em> (with Sonia Zaharia) was published in the <em>European Economic Review</em>.</p>
<p><strong>June 2019:</strong> <em>Do SMEs Benefit from Unconventional Monetary Policy and How? Micro-Evidence from the Eurozone</em> (with Annalisa Ferrando and Gregory F. Udell) was published in the <em>Journal of Money, Credit and Banking</em>.</p>
<p><strong> April 2019:</strong> I joined the <em>Economic Policy Panel</em> for the period 2019-2020.</p>
<p><strong>February 2019:</strong> I joined the <em>Journal of Banking & Finance</em> as an associate editor.</p>
<h3>Coming Up</h3>
<p>I will discuss "Climate Risk and FDI" by Grace Gu and Galina Hale at the <em>NBER’s</em> 45th annual meeting of the <em>International Seminar on Economics</em>, hosted by the <em>Bank of Greece</em> on June 20-21.</p>
<p>I am co-organizing, with Ralph De Haas, the <em>CEPR/EBRD/ECB Symposium</em> on “Climate change, finance and green growth”. The inaugural event took place virtually on 14-15 June 2021 in Frankfurt, and we had a very strong program. Stay tuned for the next installment!</p>
</div>
<!-- Footer Section -->
<footer>
<div class="button">EMAIL ME</div>
<p align="center"><strong>Tel.: +49(0)6913448428</strong></p>
<div class="footernav"> My RePEc page My Google scholar page My Vox page </div>
<p align="center"><small>©2022 Alexander Popov. Designed by Alphadesigner.</small></p>
</footer>
</div>
<!-- Main Container Ends -->
</body>
</html>
And here is the css:
#charset "UTF-8";
/* Google Fonts Import */
#import url('https://fonts.googleapis.com/css2 family=Open+Sans:ital,wght#0,300;0,400;0,600;1,300;1,400;1,600&display=swap');
/* Body */
body {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
margin: 0;
}
/* Links */
a {
color: #1D7E96;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
/* Container */
.container {
width: 100%;
margin-left: auto;
margin-right: auto;
background-color: #F7F3E9;
}
/* Header */
header {
width: 100%;
height: auto;
text-align: center;
}
/* Content */
.intro {
padding-top: 50px;
padding-left: 35px;
padding-right: 35px;
padding-bottom: 15px;
display: inline-block;
background-image: url(../images/bg.jpg);
background-repeat: repeat-x;
background-size: 1200px 400px;
background-position: center bottom;
}
#media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-moz-device-pixel-ratio: 1.5), only screen and (min-resolution: 240dpi) {
.intro {
background-image: url(../images/bg#3x.jpg);
}
.column {
width: 50%;
text-align: center;
padding-top: 30px;
float: left;
}
.intro .column h3 {
padding-left: 30px;
padding-right: 30px;
text-align: left;
line-height: 25px;
font-weight: 600;
margin-left: 20px;
margin-right: 20px;
width: 80%;
font-size: 24px;
}
.intro .column p {
padding-left: 30px;
padding-right: 30px;
text-align: left;
line-height: 25px;
font-weight: 400;
margin-left: 20px;
margin-right: 20px;
width: 80%;
font-size: 16px;
}
.intro .column em {
font-weight: 300;
}
.content {
width: 60%;
align: center;
margin-left: auto;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;
padding-bottom: 50px;
}
.content h3 {
text-transform: uppercase;
font-weight: 300;
font-size: 20px;
letter-spacing: 4px;
color: #D45D35;
top: auto;
padding-top: 20px;
text-align: center;
margin-bottom: 30px;
margin-top: 60px;
padding-bottom: 20px;
border-bottom: thin dotted #D45D35;
}
.content h4 {
font-weight: 400;
font-size: 18px;
margin-bottom: 0px;
}
.content p {
margin-top: 0px;
}
.content em {
font-weight: 400;
}
.content li {
list-style-type: square;
list-style-position: inside;
}
footer {
background-color: #E4D9C9;
padding-top: 30px;
padding-bottom: 30px;
}
footer p {
margin: 0px;
padding: 0px;
}
.profile {
width: 50%;
}
/* Mobile */
#media (max-width: 320px) {
.intro {
background-position: center top;
}
.content {
width: 80%;
}
.intro .column h3 {
width: 90%;
text-align: center;
padding-left: 0px;
}
.intro .column p {
width: 80%;
text-align: center;
margin-left: 0px;
}
.column {
width: 100%;
margin-top: 0px;
}
.profile {
width: 100%;
}
}
/* Small Tablets */
#media (min-width: 321px)and (max-width: 767px) {
.intro {
background-position: center top;
}
.content {
width: 80%;
}
.column {
width: 100%;
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
}
.profile {
width: 80%;
}
.intro .column h3 {
width: 90%;
text-align: center;
padding-left: 0px;
}
.intro .column p {
width: 90%;
text-align: center;
padding-left: 0px;
}
}
/* Small Desktops */
#media (min-width: 768px) and (max-width: 1096px) {
.intro .column p {
width: 80%;
}
.profile {
width: 80%;
}
}
/*MENUS */
.footernav {
width: 100%;
margin-left: auto;
margin-right: auto;
text-align: center;
}
.footernav a {
display: inline-block;
color: #1D7E96;
text-align: center;
padding: 12px 12px;
margin-left: auto;
margin-right: auto;
}
.topnav {
position: fixed;
width: 100%;
height: 40px;
top: 0;
left: 0;
-webkit-box-shadow: 0px 1px 6px 0 #000000;
box-shadow: 0px 1px 6px 0 #000000;
background-color: #000000;
padding-bottom: 10px;
color: #F7F3E9;
overflow: hidden;
}
.topnav a {
display: inline-block;
color: #F7F3E9;
text-align: center;
padding: 14px 14px;
text-decoration: none;
font-size: 16px;
}
.topnav a:hover {
color: #83C3E1;
}
.topnav a.active {
color: #83C3E1;
}
.topnav .icon {
display: none;
}
/* When the screen is less than 900 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
#media screen and (max-width: 900px) {
.topnav {
position: fixed;
height: auto;
padding-bottom: 0px;
}
.topnav a:not(:first-child) {
display: none;
}
.topnav a:first-child {
margin-left: 42px;
}
.topnav a.icon {
float: right;
display: block;
}
}
/* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */
#media screen and (max-width: 900px) {
.topnav.responsive {
position: fixed;
}
.topnav.responsive a.icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: center;
margin: 0px;
}
}
/* Back to top button */
#myBtn {
display: none;
position: fixed;
bottom: 50px;
right: 40px;
z-index: 99;
font-size: 16px;
font-weight: 400;
letter-spacing: 1px;
text-transform: uppercase;
border: none;
outline: none;
background-color: #000000;
color: #FFFFFF;
cursor: pointer;
padding: 20px;
border-radius: 4px;
-webkit-box-shadow: 0px 1px 3px 0 #000000;
box-shadow: 0px 1px 4px 0 #000000;
}
#myBtn:hover {
background-color: #1D7E96;
}
/*Email Button */
.button {
width: 150px;
margin-top: 15px;
margin-right: auto;
margin-bottom: 15px;
margin-left: auto;
padding-top: 20px;
padding-right: 10px;
padding-bottom: 20px;
padding-left: 10px;
text-align: center;
vertical-align: middle;
border-radius: 0px;
text-transform: uppercase;
font-size: 16px;
font-weight: 400;
letter-spacing: 1px;
color: #ffffff;
background-color: #000000;
border-radius: 4px;
}
.button a {
color: #F7F3E9;
text-decoration: none;
}
.button:hover {
background-color: #1D7E96;
color: #FFFFFF;
cursor: pointer;
}
You forgot to close your media-query, it is found at line 51 of your css file.
#media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-moz-device-pixel-ratio: 1.5), only screen and (min-resolution: 240dpi) {
Therefor the styling of your navbar and all the other things inside the media-query will not display unless the screen matches the query.
I do not know what you want to create with the media-query therefor I cannot place it correctly. But when I commented the media-query out of your code your css displayed on your website.
#charset "UTF-8";
/* Google Fonts Import */
#import url('https://fonts.googleapis.com/css2 family=Open+Sans:ital,wght#0,300;0,400;0,600;1,300;1,400;1,600&display=swap');
/* Body */
body {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
margin: 0;
}
/* Links */
a {
color: #1D7E96;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
/* Container */
.container {
width: 100%;
margin-left: auto;
margin-right: auto;
background-color: #F7F3E9;
}
/* Header */
header {
width: 100%;
height: auto;
text-align: center;
}
/* Content */
.intro {
padding-top: 50px;
padding-left: 35px;
padding-right: 35px;
padding-bottom: 15px;
display: inline-block;
background-image: url(../images/bg.jpg);
background-repeat: repeat-x;
background-size: 1200px 400px;
background-position: center bottom;
}
#media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-moz-device-pixel-ratio: 1.5), only screen and (min-resolution: 240dpi) { .intro {
background-image: url(../images/bg#3x.jpg); } .column {
width: 50%;
text-align: center;
padding-top: 30px;
float: left; } .intro .column h3 {
padding-left: 30px;
padding-right: 30px;
text-align: left;
line-height: 25px;
font-weight: 600;
margin-left: 20px;
margin-right: 20px;
width: 80%;
font-size: 24px; } .intro .column p {
padding-left: 30px;
padding-right: 30px;
text-align: left;
line-height: 25px;
font-weight: 400;
margin-left: 20px;
margin-right: 20px;
width: 80%;
font-size: 16px; } .intro .column em {
font-weight: 300; } }
.content {
width: 60%;
align: center;
margin-left: auto;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;
padding-bottom: 50px;
}
.content h3 {
text-transform: uppercase;
font-weight: 300;
font-size: 20px;
letter-spacing: 4px;
color: #D45D35;
top: auto;
padding-top: 20px;
text-align: center;
margin-bottom: 30px;
margin-top: 60px;
padding-bottom: 20px;
border-bottom: thin dotted #D45D35;
}
.content h4 {
font-weight: 400;
font-size: 18px;
margin-bottom: 0px;
}
.content p {
margin-top: 0px;
}
.content em {
font-weight: 400;
}
.content li {
list-style-type: square;
list-style-position: inside;
}
footer {
background-color: #E4D9C9;
padding-top: 30px;
padding-bottom: 30px;
}
footer p {
margin: 0px;
padding: 0px;
}
.profile {
width: 50%;
}
/* Mobile */
#media (max-width: 320px) {
.intro {
background-position: center top;
}
.content {
width: 80%;
}
.intro .column h3 {
width: 90%;
text-align: center;
padding-left: 0px;
}
.intro .column p {
width: 80%;
text-align: center;
margin-left: 0px;
}
.column {
width: 100%;
margin-top: 0px;
}
.profile {
width: 100%;
}
}
/* Small Tablets */
#media (min-width: 321px)and (max-width: 767px) {
.intro {
background-position: center top;
}
.content {
width: 80%;
}
.column {
width: 100%;
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
}
.profile {
width: 80%;
}
.intro .column h3 {
width: 90%;
text-align: center;
padding-left: 0px;
}
.intro .column p {
width: 90%;
text-align: center;
padding-left: 0px;
}
}
/* Small Desktops */
#media (min-width: 768px) and (max-width: 1096px) {
.intro .column p {
width: 80%;
}
.profile {
width: 80%;
}
}
/*MENUS */
.footernav {
width: 100%;
margin-left: auto;
margin-right: auto;
text-align: center;
}
.footernav a {
display: inline-block;
color: #1D7E96;
text-align: center;
padding: 12px 12px;
margin-left: auto;
margin-right: auto;
}
.topnav {
position: fixed;
width: 100%;
height: 40px;
top: 0;
left: 0;
-webkit-box-shadow: 0px 1px 6px 0 #000000;
box-shadow: 0px 1px 6px 0 #000000;
background-color: #000000;
padding-bottom: 10px;
color: #F7F3E9;
overflow: hidden;
}
.topnav a {
display: inline-block;
color: #F7F3E9;
text-align: center;
padding: 14px 14px;
text-decoration: none;
font-size: 16px;
}
.topnav a:hover {
color: #83C3E1;
}
.topnav a.active {
color: #83C3E1;
}
.topnav .icon {
display: none;
}
/* When the screen is less than 900 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
#media screen and (max-width: 900px) {
.topnav {
position: fixed;
height: auto;
padding-bottom: 0px;
}
.topnav a:not(:first-child) {
display: none;
}
.topnav a:first-child {
margin-left: 42px;
}
.topnav a.icon {
float: right;
display: block;
}
}
/* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */
#media screen and (max-width: 900px) {
.topnav.responsive {
position: fixed;
}
.topnav.responsive a.icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: center;
margin: 0px;
}
}
/* Back to top button */
#myBtn {
display: none;
position: fixed;
bottom: 50px;
right: 40px;
z-index: 99;
font-size: 16px;
font-weight: 400;
letter-spacing: 1px;
text-transform: uppercase;
border: none;
outline: none;
background-color: #000000;
color: #FFFFFF;
cursor: pointer;
padding: 20px;
border-radius: 4px;
-webkit-box-shadow: 0px 1px 3px 0 #000000;
box-shadow: 0px 1px 4px 0 #000000;
}
#myBtn:hover {
background-color: #1D7E96;
}
/*Email Button */
.button {
width: 150px;
margin-top: 15px;
margin-right: auto;
margin-bottom: 15px;
margin-left: auto;
padding-top: 20px;
padding-right: 10px;
padding-bottom: 20px;
padding-left: 10px;
text-align: center;
vertical-align: middle;
border-radius: 0px;
text-transform: uppercase;
font-size: 16px;
font-weight: 400;
letter-spacing: 1px;
color: #ffffff;
background-color: #000000;
border-radius: 4px;
}
.button a {
color: #F7F3E9;
text-decoration: none;
}
.button:hover {
background-color: #1D7E96;
color: #FFFFFF;
cursor: pointer;
}
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Alexander Popov — Home</title>
<link href="index.css" rel="stylesheet" type="text/css">
<!-- Load an icon library to show a hamburger menu (bars) on small screens -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<!-- Back to top button -->
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<script>
//Get the button
var mybutton = document.getElementById("myBtn");
// When the user scrolls down 200px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<!-- Main Container -->
<div class="container">
<!-- Header -->
<header class="header">
<div class="topnav" id="myTopnav"> Home Selected Publications Published Research Working Papers Personal Curriculum Vitae <i class="fa fa-bars"></i> </div>
<script>
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
</header>
<!-- Hero Section -->
<section class="intro">
<div class="column"> <img src="images/profile.png" alt="" class="profile"> </div>
<div class="column">
<h3>Alexander A. Popov</h3>
<p>PhD, <em>University of Chicago</em> <br>
Research Adviser, <em>European Central Bank</em><br>
Research Fellow, <em>CEPR Financial Economics & CEPR Monetary Economics</em></p>
</div>
</section>
<!-- Starts Content Section -->
<div class="content">
<h3>Intro</h3>
<p>I am a research economist, at the <em>European Central Bank</em> since 2007. </p>
<p>I am also a <em>CEPR Research Fellow</em>, both in the <em style="">Financial Economics Programme</em> and in the <em>Monetary Economics and Fluctuations Programme</em>.</p>
<p>My areas of interest are:
<ul>
<li>finance, growth, and risk;</li>
<li>banks and the real economy;</li>
<li>finance and politics;</li>
<li>finance and labor.</li>
</ul>
</p>
<p>My work has been published in top journals in both economics and finance, such as <em>American Economic Journal: Macroeconomics, Journal of International Economics</em> (2x), <em>Journal of Development Economics, Journal of Financial Economics, Review of Financial Studies</em> (2x), <em>American Economic Review Papers & Proceedings</em>, and <em>European Economic Review</em>.</p>
<p>My research papers have been presented in top academic conferences in economics, such as <em>AEA</em> (3x), <em>AFA</em> (2x), <em>Darden International Finance</em> (2x), <em>ECB/CEPR Labor Market Workshop</em> (2x), <em>Econometric Society World Congress, EEA</em> (3x), <em style="">EFA</em> (7x), <em>FIRS</em> (2x), <em>Lenzerheide</em>, <em>RES</em> (3x), <em>SED</em>, <em style="">Utah Finance</em>, and <em>WFA</em> (2x).</p>
<p>My research has been cited by the <em>Economist, Bloomberg, Financial Times</em>, and <em>Frankfurter Allgemeine Zeitung</em>, as well as received <em>Best Paper Awards</em> from the <em>Review of Finance</em>, the <em>Australasian Conference on Banking and Finance</em>, and the <em>Cass Business School Emerging Markets Finance Conference</em>.</p>
<p>I have taught an undergraduate course in <em>econometrics</em> at the <em>University of Chicago</em> and a graduate course in <em>corporate finance theory</em> at <em>Tilburg University</em>.</p>
<p>In the <em>RePEc</em> ranking, I am ranked in the <strong>top 1% in the world in the past 10 years</strong>, and in the top 100 in Europe.</p>
<p>Disclaimer: This is my personal website. The opinions expressed here do not represent the views of the <em>ECB</em> or the <em>Eurosystem</em>.</p>
<h3>Recent</h3>
<p><strong>December 2021:</strong> <em>The Economist</em> featured my recent paper Carbon Taxes and the Geography of Fossil Lending with Luc Laeven to make the case for a global - as opposed to a piecemeal - carbon tax.</p>
<p><strong>October 2021:</strong> I joined the <em>Monetary Economics and Fluctuations Program</em> and the <em>Financial Economics Program</em> of the <em>CEPR</em> as a Research Fellow.</p>
<p><strong>May 2021:</strong> <em>Political Cycles in Bank Lending to the Government</em> (with Michael Koetter) was published in the <em>Review of Financial Studies</em>.</p>
<p><strong>November 2020:</strong> My discussion of Orkun Saka's <em>Domestic Banks As Lightning Rods? Home Bias and Information during the Eurozone Crisis</em> was published in the <em>Journal of Money, Credit, and Banking</em>.</p>
<p><strong>October 2020:</strong> <em>Debt Overhang, Global Growth Opportunities, and Investment</em> (with Francesca Barbiero and Marcin Wolski) was published in the <em>Journal of Banking & Finance</em>.</p>
<p><strong>December 2019:</strong> <em>On the Link Between the Volatility and Skewness of Growth</em> (with Geert Bekaert) was published in the <em>IMF Economic Review</em>.</p>
<p><strong>October 2019:</strong> <em>The Invisible Hand of the Government: Moral Suasion During the Sovereign Debt Crisis</em> (with Steven Ongena and Neeltje Van Horen) was published in the <em>American Economic Journal: Macroeconomics</em>.</p>
<p><strong>June 2019:</strong> <em>Credit Market Competition and the Gender Gap in Labor Force Participation: Evidence from Local Labor Markets</em> (with Sonia Zaharia) was published in the <em>European Economic Review</em>.</p>
<p><strong>June 2019:</strong> <em>Do SMEs Benefit from Unconventional Monetary Policy and How? Micro-Evidence from the Eurozone</em> (with Annalisa Ferrando and Gregory F. Udell) was published in the <em>Journal of Money, Credit and Banking</em>.</p>
<p><strong> April 2019:</strong> I joined the <em>Economic Policy Panel</em> for the period 2019-2020.</p>
<p><strong>February 2019:</strong> I joined the <em>Journal of Banking & Finance</em> as an associate editor.</p>
<h3>Coming Up</h3>
<p>I will discuss "Climate Risk and FDI" by Grace Gu and Galina Hale at the <em>NBER’s</em> 45th annual meeting of the <em>International Seminar on Economics</em>, hosted by the <em>Bank of Greece</em> on June 20-21.</p>
<p>I am co-organizing, with Ralph De Haas, the <em>CEPR/EBRD/ECB Symposium</em> on “Climate change, finance and green growth”. The inaugural event took place virtually on 14-15 June 2021 in Frankfurt, and we had a very strong program. Stay tuned for the next installment!</p>
</div>
<!-- Footer Section -->
<footer>
<div class="button">EMAIL ME</div>
<p align="center"><strong>Tel.: +49(0)6913448428</strong></p>
<div class="footernav"> My RePEc page My Google scholar page My Vox page </div>
<p align="center"><small>©2022 Alexander Popov. Designed by Alphadesigner.</small></p>
</footer>
</div>
<!-- Main Container Ends -->
</body>
</html>
More information about media queries

Body content spills on x axis

I am recreating website to practice my html and css skills.
I am doing mobile first, and when i set my device width/height on Iphone 6/7/8 ( 375x667 ) (and of course it may be the case for other widths ) body content spills to the right of viewport border.
I know this may be too much code but i am really stuck on this and i don't really know what is causing this problem.
I am previewing it in Opera Developer Tools.
Thanks in advance .
CSS:
body {
background-color: #fff;
font-family: sans-serif;
overflow: auto;
}
/* NAVIGATION HEADER */
header {
display: flex;
height: 80px;
max-width: 100%;
}
.logo {
flex-basis: 27%;
padding: 14px 5px;
}
.menu {
list-style-type: none;
flex-basis: 70%;
}
.menu li {
display: inline-block;
padding: 20px 3px;
}
.menu a {
text-decoration: none;
color: #595959;
font-size: 20px;
}
/* HERO */
.hero {
position: relative;
text-align: center;
}
h1 {
font-size: 39px;
font-weight: 800;
text-align: center;
line-height: 1;
margin-top: 55px;
}
.hero h3 {
text-align: center;
font-size: 19px;
font-weight: normal;
color: #595959;
word-wrap: normal;
margin: 20px 20px;
}
.button {
/* position: absolute; */
display: inline-block;
background-color: #e54545;
padding: 8px 26px;
padding-top: 13px;
border-radius: 60px;
color: white;
line-height: 1.5;
font-size: 18px;
text-align: center;
font-weight: 400;
}
/*
.seework {
top: 230px;
left: 30%;
}
*/
.bckgrnd {
position: relative;
display: inline-block;
background-image: url("pozadina.png");
background-size: cover;
background-position: center;
width: 100%;
height: 250px;
top: -50px;
z-index: -1;
margin: 0;
}
.strelica {
display: inline-block;
position: relative;
font-size: 30px;
font-weight: bold;
color: #595959;
z-index: 2;
text-align: center;
top: 80%;
border: 2px solid #595959;
box-sizing: border-box;
padding: 1px 12px 6px;
border-radius: 50%;
}
/* SIVI SKROL*/
.skrol {
position: relative;
left: 0;
background-color: #595959;
padding: 20px;
margin: 0;
min-width: 100%;
}
#media(min-width: 750px) {
.logomob {
display: none;
}
}
#media(max-width: 750px) {
.logodesk {
display: none;
}
}
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>nLight - User Experiance & User Interface Design Studio</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div class="logo">
<img src="logomob.png" alt="nLight logo" class="logomob hidedesk">
<img src="logodesk.png" alt="nLight logo" class="logodesk hidemob">
</div>
<nav>
<ul class="menu">
<li>Work</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
</header>
<section class="hero">
<h1>Independent Interface design studio.</h1>
<h3>We are located in sunny Novi Sad, Europe, and work with people worldwide</h3>
<div class="button seework">See Work</div>
<div class="bckgrnd"> <div class="strelica"> ↓ </div> </div>
</section>
<section class="skrol">
<div class="skrolhed">
<h2> Simple solutions to complex problems. </h2>
<p> User Experience / Interface Design & Front-end Development.
One man studio. 10+ years of experience.
</p>
</div>
<div class="skrolbox1">
<em>DESIGN</em>
<h3>We do Interface design and we are serious about it.</h3>
<p>Web applications, SAAS, marketing web sites. From discovery, prototyping, and design, through iterations to final product.</p>
</div>
<div class="skrolbox2">
<em>DEVELOPMENT</em>
<h3>Front-end Development</h3>
<p>Creating front end strategy that scales. Including living style guide, documentation and methodology to on-board new developers.</p>
</div>
<div class="button about">About Us</div>
</section>
<footer>
<img src="logofut.png" alt="nLight logo" class="logofut">
<p>© 2019 nLight. Hand Made in Europe.</p>
</footer>
</body>
</html>
Not sure if this is the fix you are looking for, but replacing min-width: 100% by max-width: 100% for skrol seems to do it.
.skrol {
position: relative;
left: 0;
background-color: #595959;
padding: 20px;
margin: 0;
max-width: 100%; /*instead of min-width*/
}

Header margin is pushing div with background image

I want to set a margin of 100px between the header and .content-container. Every time I set the margin, either on the header or .content-container, the background image is pushed as well. Maybe it's connected to the position attributes for the .content-wrap and header selectors, but I'm not sure. I'm still new to frontend dev, so I'm not sure where the problem could be.
html, body, header, h1, h2, h3, div, figure, figcaption, img, p, a {
margin: 0;
padding: 0;
border: 0;
}
html, body {
height: 100%;
}
h1, h2, h3, p {
font-family: sans-serif;
}
.sticky-footer-wrapper {
min-height: 100%;
/*Equal to height of footer*/
margin-bottom: -200px;
}
.content-wrap {
width: 100%;
height: 100%;
display: block;
position: relative;
z-index: -10;
}
.content-wrap::after {
content: "";
background: #5F5449 url(http://margraonline.com/wp-content/uploads/2015/08/pretty-coffee-beans.jpeg);
opacity: 0.5;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
}
header {
position: relative;
height: 100px;
background: #291711;
}
header img {
display: block;
padding-top: 20px;
padding-right: 10px;
padding-left: 20px;
float: left;
}
header h1 {
color: #EEF0F2;
font-size: 40px;
font-weight: bold;
padding-top: 20px;
padding-left: 20px;
}
header nav {
float: right;
padding-bottom: 0;
}
header nav a {
text-decoration: none;
color: #D1BEB0;
padding-right: 15px;
font-size: 20px;
}
a:nth-child(5) {
padding-right: 55px;
}
a:hover {
color: #938BA1;
}
#active-link {
color: #938BA1;
text-decoration: underline;
}
.content-container {
margin-top: 100px;
margin-bottom: 300px;
width: 60%;
background-color: #D9C9BE;
border: 2px solid #291711;
}
.content-container h2 {
font-size: 36px;
color: #4E453C;
text-decoration: underline;
text-align: center;
padding: 15px 0;
}
.content-container h3 {
font-size: 26px;
color: #3C2C26;
text-align: center;
padding: 20px 0 10px 0;
}
figure {
display: block;
border: 1px solid #3C2C26;
background-color: #FFFCF3;
height: 300px;
width: 400px;
margin: 0 auto;
}
figure img {
width: 100%;
text-align: center;
}
figcaption, p {
text-align: center;
padding-bottom: 10px;
}
blockquote {
position: relative;
font-size: 18px;
}
footer, push {
height: 200px;
}
footer {
width: 100%;
background-color: #291711;
text-align: center;
}
footer nav a {
float: inherit;
text-decoration: none;
color: #D1BEB0;
font-size: 28px;
font-family: Arial, serif;
font-weight: lighter;
padding-right: 15px;
}
#top-row {
padding-top: 25px;
padding-bottom: 15px;
}
#bottom-row {
padding-bottom: 25px;
}
footer p {
color: #D1BEB0;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Bloc Frontend Formations Part 1</title>
</head>
<body>
<div class="sticky-footer-wrapper">
<header>
<img src="https://i.imgur.com/v6FOpf0.png" title="source: imgur.com" />
<h1>Specialty Coffee Company</h1>
<nav>
Home
About SCC
<a id="active-link" href="#">Rare Coffees</a>
Store
Contact us
</nav>
</header>
<!-- Content Wrap -->
<div class="content-wrap">
<!-- Content Container -->
<section class="content-container">
<h2>Rare Coffees</h2>
<h3>Kopi Luwak</h3>
<figure>
<img src="https://www.indoneo.com/wp-content/uploads/2017/03/luwak_coffee_for_sale.jpg" alt="Kopi Luwak Coffee">
<figcaption><i>Kopi luwak for sale in Indonesia.</i></figcaption>
</figure>
<blockquote>"It’s the world’s most expensive coffee, and it’s made from poop. Or rather, it’s made from coffee beans that are partially digested and then pooped out by the civet, a catlike creature. A cup of kopi luwak, as it’s known, can sell for as much as $80 in the United States."</blockquote>
<p><cite>The Disturbing Secret Behind the World’s Most Expensive Coffee</cite> by Rachael Bale. National Geographic. <time>April 29, 2016</time></p>
<!-- End Content Container -->
</section>
<!-- End Content Wrap -->
</div>
<!-- Push for Sticky Footer -->
<div class="push"></div>
<!-- End Sticky Footer Wrapper -->
</div>
<footer>
<nav id="top-row">
Locations
Press
Blog
Jobs
FAQ
</nav>
<nav id="bottom-row">
Sustainability
Contact
</nav>
<p>Speciality Coffee Company, Torokv&eacutesz &uacutet 95-97, Budapest</p>
</footer>
</body>
</html>
You need padding-top instead of margin-top of 100px.
Reason: Margin increase the space between elements, it doesn't actually increase the elements dimensions, whereas padding increases the space between the element edge and the content, which is what is needed in the current scenario!
html, body, header, h1, h2, h3, div, figure, figcaption, img, p, a {
margin: 0;
padding: 0;
border: 0;
}
html, body {
height: 100%;
}
h1, h2, h3, p {
font-family: sans-serif;
}
.sticky-footer-wrapper {
min-height: 100%;
/*Equal to height of footer*/
margin-bottom: -200px;
}
.content-wrap {
width: 100%;
height: 100%;
display: block;
position: relative;
z-index: -10;
}
.content-wrap::after {
content: "";
background: #5F5449 url(http://margraonline.com/wp-content/uploads/2015/08/pretty-coffee-beans.jpeg);
opacity: 0.5;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
}
header {
position: relative;
height: 100px;
background: #291711;
}
header img {
display: block;
padding-top: 20px;
padding-right: 10px;
padding-left: 20px;
float: left;
}
header h1 {
color: #EEF0F2;
font-size: 40px;
font-weight: bold;
padding-top: 20px;
padding-left: 20px;
}
header nav {
float: right;
padding-bottom: 0;
}
header nav a {
text-decoration: none;
color: #D1BEB0;
padding-right: 15px;
font-size: 20px;
}
a:nth-child(5) {
padding-right: 55px;
}
a:hover {
color: #938BA1;
}
#active-link {
color: #938BA1;
text-decoration: underline;
}
.content-container {
padding-top: 100px;
margin-bottom: 300px;
width: 60%;
background-color: #D9C9BE;
border: 2px solid #291711;
}
.content-container h2 {
font-size: 36px;
color: #4E453C;
text-decoration: underline;
text-align: center;
padding: 15px 0;
}
.content-container h3 {
font-size: 26px;
color: #3C2C26;
text-align: center;
padding: 20px 0 10px 0;
}
figure {
display: block;
border: 1px solid #3C2C26;
background-color: #FFFCF3;
height: 300px;
width: 400px;
margin: 0 auto;
}
figure img {
width: 100%;
text-align: center;
}
figcaption, p {
text-align: center;
padding-bottom: 10px;
}
blockquote {
position: relative;
font-size: 18px;
}
footer, push {
height: 200px;
}
footer {
width: 100%;
background-color: #291711;
text-align: center;
}
footer nav a {
float: inherit;
text-decoration: none;
color: #D1BEB0;
font-size: 28px;
font-family: Arial, serif;
font-weight: lighter;
padding-right: 15px;
}
#top-row {
padding-top: 25px;
padding-bottom: 15px;
}
#bottom-row {
padding-bottom: 25px;
}
footer p {
color: #D1BEB0;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Bloc Frontend Formations Part 1</title>
</head>
<body>
<div class="sticky-footer-wrapper">
<header>
<img src="https://i.imgur.com/v6FOpf0.png" title="source: imgur.com" />
<h1>Specialty Coffee Company</h1>
<nav>
Home
About SCC
<a id="active-link" href="#">Rare Coffees</a>
Store
Contact us
</nav>
</header>
<!-- Content Wrap -->
<div class="content-wrap">
<!-- Content Container -->
<section class="content-container">
<h2>Rare Coffees</h2>
<h3>Kopi Luwak</h3>
<figure>
<img src="https://www.indoneo.com/wp-content/uploads/2017/03/luwak_coffee_for_sale.jpg" alt="Kopi Luwak Coffee">
<figcaption><i>Kopi luwak for sale in Indonesia.</i></figcaption>
</figure>
<blockquote>"It’s the world’s most expensive coffee, and it’s made from poop. Or rather, it’s made from coffee beans that are partially digested and then pooped out by the civet, a catlike creature. A cup of kopi luwak, as it’s known, can sell for as much as $80 in the United States."</blockquote>
<p><cite>The Disturbing Secret Behind the World’s Most Expensive Coffee</cite> by Rachael Bale. National Geographic. <time>April 29, 2016</time></p>
<!-- End Content Container -->
</section>
<!-- End Content Wrap -->
</div>
<!-- Push for Sticky Footer -->
<div class="push"></div>
<!-- End Sticky Footer Wrapper -->
</div>
<footer>
<nav id="top-row">
Locations
Press
Blog
Jobs
FAQ
</nav>
<nav id="bottom-row">
Sustainability
Contact
</nav>
<p>Speciality Coffee Company, Torokv&eacutesz &uacutet 95-97, Budapest</p>
</footer>
</body>
</html>

Why do pixels appear a different size on the same device on these two web pages?

I'm making a portfolio for some projects I've worked on whilst learning to code. I've added a banner to the top of each project's webpage, but I'm having issues with a site which is unresponsive (Jubilee Austen page).
Using the Chrome Inspector tool, it says the banner is 55px tall, but it appears smaller than it does on another project page (Rogue Pickings page), where the height of the banner is also 55px. How could this be?
Jubilee Austen page
Rogue Pickings page
Does anyone know how I can fix this so that both banners appear the same height?
Thanks so much in advance!
/* ===== JUBILLEE AUSTEN ===== */
font-family: atelas;
src :url('../fonts/atelas/atelas.ttf') format('opentype');
}
/* -------- PORTFOLIO BANNER & MANAGEMENT -------- */
.back {
width: 100%;
background-color: #1D2120;
padding: 10px 0;
position: fixed;
top: 0px;
}
.div-link {
position:absolute;
width:100%;
height:100%;
top:0;
left: 0;
z-index: 1;
background-image: url('empty.gif');
}
.back-wrap {
width: 90%;
margin: auto;
}
.chevron {
margin: 0;
}
.chevron img {
width: 35px;
float: left;
margin-right: 1.5%;
}
.back-text {
margin: 0 0 0 3%;
font-family: atelas;
font-size: 6em;
color: #e2e2e2;
text-decoration: none;
line-height: 0.8;
display: none;
}
#example {
clear: both;
padding-top: 50px;
}
/* ======== ORIGINAL CSS ======== */
/* -------- START OF ORIGINAL CSS -------- */
body {
font-family: 'Source Sans Pro', sans-serif;
}
#about, #work, #contact {
height: 600px;
}
/***** GRID *****/
.full-width {
width: 1200px;
margin: 0 auto;
}
.half-width {
width: 600px;
float: left;
}
.third-width {
width: 400px;
float: left;
}
/***** HEADER *****/
header {
height: 800px;
background: url('../img/hero.png');
background-size: cover;
}
header h1 {
padding: 50px 0;
font-family: 'Lora', serif;
font-size: 30px;
color: #BBC085;
padding-left: 80px;
}
#nav {
float: right;
padding: 75px 0;
}
nav ul li {
display: inline-block;
}
nav ul li a {
text-transform: uppercase;
text-decoration: none;
font-size: 18px;
color: #828282;
padding-left: 80px;
}
header h2 {
width: 1000px;
clear: both;
font-family: 'Lora', serif;
font-size: 72px;
line-height: 80px;
color: #9a9a9a;
padding: 20px 0 0 80px;
}
header h2 span {
color: #262a2b
}
/***** ABOUT *****/
#about .full-width {
padding: 80px 0;
}
#about h2 {
font-family:'Lora', serif;
font-size: 36px;
}
#about p {
font-size: 21px;
color: #7F7F7F;
line-height: 42px;
padding-right: 50px;
}
/***** WORK *****/
#work {
background: #F9CEB7;
text-align: center;
}
#work .full-width {
padding: 115px 0;
}
#work img {
padding-bottom: 30px;
}
#work h3 {
font-size: 24px;
width: 180px;
margin: 0 auto;
}
#work p {
font-family: 'Lora', serif;
font-size: 18px;
line-height: 30px;
color: #262a2b;
padding: 0 35px;
}
/**** CONTACT *****/
#contact {
background: #EBEBEB;
}
#contact .full-width {
padding: 110px 0;
}
#contact img#contact-img {
border: 16px solid #ffffff;
}
#contact h2, #contact #email-header, #contact #socialmedia-header, #contact ul {
padding-left: 115px;
}
#contact #envelope {
padding: 0 10px 0 115px;
}
#contact h2 {
font-family: 'Lora', serif;
font-size: 36px;
}
#contact #email-header{
font-size: 32px;
font-weight: 400;
margin: -30px 0 5px 0;
}
#contact #socialmedia-header {
font-weight: bold;
font-size: 29px;
margin: 40px 0 0px 0;
}
#contact a {
text-decoration: none;
color: #C49075;
font-weight: bold;
font-size: 28px;
}
#contact ul {
list-style: none;
}
#contact ul li {
display: inline-block;
}
#contact ul img {
font-size: 32px;
padding-right: 48px;
}
/* ======== END ORIGINAL CSS ======== */
/* TABLET */
#media all and (min-width: 768px) {
}
#media screen and (min-width: 940px) {
/* -------- PORTFOLIO BANNER CSS -------- */
.chevron img {
width: 30px;
}
.back-text {
font-size: 3em;
}
}
<!doctype html>
<!-- JUBILEE AUSTEN -->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Jubilee Austen | Developer</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<!-- FONTS -->
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Lora:400,700' rel='stylesheet' type='text/css'>
</head>
<body>
<!-- PORTFOLIO BANNER -->
<section class="back">
<a class="div-link" href="../index.html"><span></span></a>
<div class="back-wrap">
<figure class="chevron">
<img src="../img/chevron-b.png" />
<img src="../img/chevron-g.png" />
<img src="../img/chevron-o.png" />
<img src="../img/chevron-r.png" />
</figure>
<p class="back-text">back</p>
</div>
</section>
<!-- START OF ORIGINAL BODY -->
<div id="example">
<!-- NAV/TITLE PANEL -->
<header>
<div class="full width">
<div class="half-width">
<h1>Jubilee Austen</h1>
</div>
<!-- NAV BAR -->
<div class="half-width" id="nav">
<nav>
<ul>
<li>About</li>
<li>Work</li>
<li>Contact</li>
</ul>
</nav>
</div>
<!-- <span>Hi,</span> used to change colour of just "Hi," text -->
<h2><span>Hi,</span> I'm a developer that loves clean & elegant code.</h2>
</div>
</header>
<main>
<!-- ABOUT PANEL -->
<section id="about">
<div class="full-width">
<h2>A little bit about me.</h2>
<div class="half-width">
<p>I've made my home base in Providence, Rhode Island with my small growing family. My journey into tech started with a degree in journalism. As I started sharing my writing online, I was fascinated with how easily I could get my voice out there. I was hooked and wanted to learn how to build my own site to fit my own specific needs.</p>
</div>
<div class="half-width">
<p>That curiosity then opened a door that could never be shut. When I learned how to build my first website, I realized I found something that gave me the freedom & versatility I was looking for in my work. Now I've made a full switch to front-end development, where I can use my organization skills and eye for detail to write clean, elegant code.</p>
</div>
</div>
</section>
<!-- PROCESS PANEL -->
<section id="work">
<div class="full-width">
<div class="third-width">
<img src="img/icon-html.png" alt="HTML icon"/>
<h3>Hand-Coded HTML</h3>
<p>My focus is writing clean, well-formatted, semantic HTML5 by hand to make sure that the content is easy to read, easy to collaborate, trouble-shoot and accessible.</p>
</div>
<div class="third-width">
<img src="img/icon-css.png" alt="CSS icon"/>
<h3>Well-Organized CSS</h3>
<p>I pride myself on writing CSS that is easy to read and build on. I focus on keeping my CSS lean and fast to load, and I make it a habit to stay up to date on current best practices.</p>
</div>
<div class="third-width">
<img src="img/icon-pencil.png" alt="Pencil icon"/>
<h3>Easy Converting PSD to HTML</h3>
<p>You can trust me to take a designer's PSD and quickly & accurately convert it into a webpage that is pixel-perfect match.</p>
</div>
</div>
</section>
<!-- CONTACT PANEL -->
<footer id="contact">
<div class="full-width">
<div class="half-width">
<img id="contact-img" src="img/contact.png" alt="Person typing at laptop"/>
</div>
<div class="half-width" id="contact-info">
<h2>Like what you see?</h2>
<h3 id="email-header">Let's meet for a cup of coffee.</h3>
<img id="envelope" src="img/icon-envelope.png" alt="mail icon"/>hi#jubileeausten.com
<h4 id="socialmedia-header">Or, find me on the interwebs</h4>
<!-- ICON LINKS -->
<ul>
<li><img src="img/icon-twitter.png" alt="Twitter icon"/></li>
<li><img src="img/icon-tumblr.png" alt="Tumblr icon"/></li>
<li><img src="img/icon-instagram.png" alt="Instagram icon"/></li>
<li><img src="img/icon-linkedin.png" alt="Linkedin icon"/></li>
<li><img src="img/icon-github.png" alt="GitHub icon"/></li>
</ul>
</div>
</div>
</footer>
</main>
<!-- END OF ORIGINAL HTML -->
</div>
</body>
</html>
/* ===== ROGUE PICKINGS ===== */
/* =========================================================================
Author's custom styles
========================================================================== */
#font-face {
font-family: atelas;
src :url('../fonts/atelas/atelas.ttf') format('opentype');
}
/* -------- PORTFOLIO BANNER & MANAGEMENT -------- */
.back {
width: 100%;
background-color: #1D2120;
padding: 10px 0;
position: fixed;
top: 0px;
}
.div-link {
position:absolute;
width:100%;
height:100%;
top:0;
left: 0;
z-index: 1;
background-image: url('empty.gif');
}
.back-wrap {
width: 90%;
margin: auto;
}
.chevron {
margin: 0;
}
.chevron img {
width: 35px;
float: left;
margin-right: 1.5%;
}
.back-text {
margin: 0 0 0 3%;
font-family: atelas;
font-size: 6em;
color: #e2e2e2;
text-decoration: none;
line-height: 0.8;
display: none;
}
#example {
max-width: 1200px;
margin: auto;
clear: both;
padding-top: 55px;
}
/* ======== ORIGINAL ROGUE PICKINGS CSS ======== */
html {
font-size:16px;
}
body {
/*max-width: 1200px; --- REMOVED FOR PORTFOLIO BANNER --- */
margin: 0 auto;
font-size: 1em;
font-family: Montserrat, Helvetica, Arial, sans-serif;
}
header {
font-size: 1em;
}
.top-section {
font-size: 1em;
}
.bottom-section {
font-size: 1em;
}
footer {
font-size: 1em;
}
header, .top-section, .bottom-section, footer {
max-width: 90%;
}
h1, h3, h4 {
text-transform: uppercase;
}
h1 {
color: black;
font-size: 1.875em;
text-align: center;
width: auto;
padding: 2.45% 0;
}
h3 {
color: black;
font-size: 1.125em;
text-align: center;
padding: 15px;
}
h4 {
color: black;
font-size: 0.75em;
}
.main-title h3 {
text-align: left;
padding: 5px 0px;
text-transform: uppercase;
color:#77a466;
}
/*The widths are in a percentage!*/
header {
width: 100%;
height: 10%;
margin: 0 auto;
}
header .heading {
border-bottom:3px solid #77a466;
height: auto;
}
header span {
color: #77a466;
}
header nav {
padding: 8% 0px;
margin:auto;
}
header nav a {
text-decoration: none;
text-transform: uppercase;
font-weight: bold;
font-size: 0.875em;
padding: 0 10px 20px 10px;
color:#77a466;
display: block;
text-align: center;
}
#last-nav {
padding: 0 10px;
}
/*The widths are in a percentage!*/
.top-section, .bottom-section {
width: 100%;
margin: 0 auto;
clear: both;
}
.main-image {
width: 100%;
height: auto;
float: left;
clear: both;
}
.main-image img {
width: 100%;
border-bottom:3px solid #77a466;
border-top: 3px solid #77a466;
}
.main-title {
width: 100%;
height: auto;
float: left;
}
.main-title p {
padding: 0px;
line-height: 156.25%;
font-size: 1em;
}
.section-one, .section-two, .section-three {
width: 100%;
height: auto;
clear: both;
border-top: 1px solid #eee;
}
.section-one h4, .section-two h4, .section-three h4 {
padding: 10px 30px 10px 0px;
}
.menu {
list-style: none;
padding: 0px 30px 0px 0px;
}
.menu li {
padding: 10px 0;
color:#77a466;
}
.reviews {
color: #333;
line-height: 135%;
font-size: 1em;
}
.address {
font-size: 1em;
line-height: 150%;
}
.reviews, .address {
padding: 0px 30px 0px 0px;
}
/*The widths are in a percentage!*/
footer {
width: 100%;
height: 50px;
border-top:3px solid #eee;
margin: 0 auto;
clear: both;
text-align: center;
}
footer span {
font-family: "Wisdom Script", script;
text-transform: lowercase;
color: #77a466;
font-size: 0.875;
}
#media all and (min-width: 600px) and (max-width: 939px) {
header nav {
padding: 3.75% 0px;
}
}
#media screen and (min-width: 940px) {
/* -------- PORTFOLIO BANNER CSS -------- */
.chevron img {
width: 30px;
}
.back-text {
font-size: 3em;
}
#example {
width: 96%;
padding: 40px 2% 0 2%;
}
/* -------- ORIGINAL CSS -------- */
body {
/*width: 96%; --- REMOVED FOR PORTFOLIO BANNER --- */
/*padding: 0 2%; --- REMOVED FOR PORTFOLIO BANNER --- */
}
header, .top-section, .bottom-section, footer {
max-width: 100%;
}
header h1 {
text-align: left;
float: left;
}
header {
height: 100px;
}
header .heading {
border-bottom: none;
}
header nav {
float: right;
width: auto;
padding: 45px 0px;
}
header nav a {
display: inline;
}
.section-one, .section-two {
border-right: 1px solid #eee
}
.section-one h4 {
padding: 10px 0px;
}
.section-two h4, .section-three h4 {
padding: 10px 30px;
}
.menu {
padding: 0px;
}
.reviews, .address {
padding: 0px 30px;
}
.section-one, .section-two, .section-three {
width: 33%;
height: auto;
clear: none;
float: left;
border-top: 1px solid #eee;
}
}
/* -------- END ORIGINAL CSS -------- */
<!doctype html>
<!-- ROGUE PICKINGS -->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Rogue Pickings</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<!-- PORTFOLIO BANNER -->
<section class="back">
<a class="div-link" href="../index.html"><span></span></a>
<div class="back-wrap">
<figure class="chevron">
<img src="../img/chevron-b.png" />
<img src="../img/chevron-g.png" />
<img src="../img/chevron-o.png" />
<img src="../img/chevron-r.png" />
</figure>
<p class="back-text">back</p>
</div>
</section>
<!-- START OF ORIGINAL BODY -->
<div id="example">
<!-- MODULE: Logo & Nav -->
<header>
<div class="heading">
<h1><span>rogue</span> pickings</h1>
</div>
<nav>
About
Menu
Locations
Gallery
Reviews
<a id="last-nav" href="#contact">Contact</a>
</nav>
</header>
<!-- MODULE: Top Section -->
<div class="top-section">
<div class="main-image"><img src="img/download.jpg" />
</div>
<div class="main-title" id="about">
<h3>Welcome to our little corner of the internet!</h3>
<p>Welcome to Rogue Pickings, the roaming truck bringing you the freshest ingredients and ideas in food. Our team works hard so you can be sure our ingredients are always fresh and picked carefully. Our menu changes every day and is made with you in mind. We can't wait to come to you! Check out our locations to see where you can find us. </p>
</div>
</div>
<!-- MODULE: Bottom Section -->
<div class="bottom-section">
<div class="section-one" id="menu"><h4>Today's Specials</h4>
<ul class="menu">
<li>Flaming Hummus & Falafel Salad</li>
<li>Sizzling Bean Burrito</li>
<li>Green Gloves Tamales</li>
</ul>
</div>
<div class="section-two" id="reviews"><h4>Our Awesome Reviews</h4>
<p class="reviews">"I got so excited about the yumminess of the falafel salad that I am typing this review as I inhale my lunch. Yes it is that good.... Service was super friendly and quick. Can't wait see you Rogue Pickings again tomorrow!"</p>
</div>
<div class="section-three" id=contact><h4>Contact</h4>
<p class="address">1001 Potrero Avenue<br>
San Francisco, CA 94110<br>
(415) 206-8000 </p>
</div>
</div>
<!-- MODULE: Footer -->
<footer>
<h4>Powered by lots of <span>fresh</span> ingredients.</h4>
</footer>
<!-- END OF ORIGINAL ROGUE PICKINGS HTML -->
</div>
</body>
</html>
i cant remember if zoom level is persistant on an iphone but it is on desktop browsers, could you have zoomed in/out of one of them? is there a way of making sure you are at 100% zoom?
Edit
is the smaller one contained in a set of tags that is smaller than 55px? as that would cause it to be restricted to the smaller size
Your banner is not responsive, its height is fixed (55px). If the site is being displayed differently - different viewport zoom, your banner will seems to be smaller/larger.
Check the viewport meta tag in those sites:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
If the initial-scale is different or if one of the pages is missing the viewport tag it can explain the differences.
As mentioned before, the zoom affects the presented width and this affects the visual size of your banner. If you want it to be responsive, you should change the height units into percentage instead of pixels.
EDIT
The first page is much wider than the second, when you zoom out to see all the page it changes the visual height of your banner.

Text in footer won't show, paragraph won't wrap, and image flows above navigation bar

http://i.imgur.com/sTt59s4.png
Problem #1: Text in footer disappeared. Just randomly noticed while I was busy aligning other elements that the text in my footer was gone.
http://i.imgur.com/WyHf37d.png
Problem #2: Paragraph won't wrap. If I hadn't put display: inline the text would disappear completely.
Problem #3: Images float on top of my nav bar. When I scroll down, the images pass on top of the bar and it looks weird.
Feel free to correct my coding in general. I am a noob. Thanks.
HTML:
<head>
<meta charset="utf-8">
<title>BIKES & BITES | ABOUT</title>
<link href="styles/Hortaleza-Kyla-styles.css" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Playfair+Display:400,700italic,900italic,900' rel='stylesheet' type='text/css'>
</head>
<header>
<section id="title-slogan">
<h1>BIKES & BITES</h1>
<p>EAT • BIKE • LOVE</p>
</section>
<nav id="main-nav">
<ul>
<li><img src="index-images/B&B-logo.png" id="logo"></li>
<li>HOME</li>
<li>ABOUT</li>
<li>ADVENTURES</li>
<li>HUNGRY?</li>
<li>CALENDAR</li>
<li>CONTACT</li>
</ul>
</nav>
</header>
<section id="main-content">
<h1>ABOUT</h1>
<section id="about-bb">
<img src="02-about-images/B&B-logo2.png">
<p id="desc"><b>BIKES & BITES</b> brings you cycling and food all wrapped into one delicious burrito. It’s for anyone, everyone; it’s for people like you! People who love health and at the same time, love good food. Whether you’re just thinking of buying a bike, a total newbie, or even a pro, we welcome everyone to the community. We're just here to have a good time!
<b>BIKES & BITES</b> aims to share with its readers the beauty and enjoyment of cycling, with the help of the natural beauty of the Philippines. It aims to encourage others to try taking up the sport—or any sport for that matter—and at the same time a healthy lifestyle (but still be able to eat what you want!). <b>BIKES & BITES</b> will provide you with routes, recipes, and many more, to help you with every aspect of your cycling life.</p>
</section>
<section id="about-creator">
<img src="02-about-images/02-about-profile.png">
<p><h3>Kyla Hortaleza</h3>
<i>Founder and Editor</i><br><br>
Despite being an avid cyclist and part-time duathlete, Kyla Hortaleza is currently an Interdisciplinary Studies major in Ateneo de Manila University. She is 22-years-old and has no experience of writing a serious blog whatsoever, but finds delight in sharing her experiences to others through her pictures. She believes in the power of juicing and the power of carbohydrates (no to fad diets but yes to moderation!). She loves promoting cycling and believes that it is the sport that anyone can try and enjoy regularly.</p>
</section>
</section>
<footer>
<p>Created by Kyla Hortaleza | 2015</p>
</footer>
</body>
CSS:
body {
margin: auto;
background: #fdedf1;
padding-top: 80px;
font-family: 'Montserrat', sans-serif;
font-weight: 400;
}
#aboutpage #main-content #about-bb p {
display: inline;
}
#aboutpage #main-content {
overflow: scroll;
}
#aboutpage #main-content p {
font-family: 'Montserrat', sans-serif;
padding-top: 200px;
}
#aboutpage #main-content img {
width: 300px;
height: 300px;
}
#aboutpage #main-nav a.about {
color: #f8bfcd;
}
#aboutpage #main-nav a.about:hover {
color: #ccf0e2;
}
#aboutpage #main-content #about-bb {
width: 400px;
float: left;
position: relative;
padding: 75px 0px 75px 200px;
}
#aboutpage #main-content #about-creator {
width: 400px;
float: left;
position: relative;
padding: 75px 0px 75px 75px;
}
#aboutpage #main-content #about-creator img {
padding-left: 45px;
}
#main-content h1 {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
body #title-slogan h1, p {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
margin-top: -21px;
}
body #title-slogan-hungry h1, p {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
margin-top: -194px;
padding: 0;
}
header {
position: fixed;
top: 0;
width: 100%;
}
#logo {
width: 60px;
height: 60px;
position: relative;
left: -10px;
top: -1px;
padding: 0;
margin: 0;
vertical-align: middle;
}
#main-nav {
background: white;
overflow: auto;
text-align: left;
padding-left: 70px;
}
#main-nav ul {
margin: 0;
padding: 0;
list-style-type: none;
font-family: 'Montserrat', sans-serif;
font-size: 15px;
font-variant-caps: all-small-caps;
font-weight: 600;
}
#main-nav ul li {
display: inline-block;
padding-top: 15px;
}
#main-nav a {
display: block;
text-align: center;
height: 50px;
color: black;
text-decoration: none;
padding: 0px 5px;
}
#main-nav a:hover {
color: #ccf0e2;
}
footer p {
background: black;
overflow: auto;
text-align: center;
color: white;
font-family: 'Montserrat', sans-serif;
font-size: 15px;
margin-top: 50px;
width: 100%;
height: 50px;
}
I've removed
white-space:nowrap;
from
body #title-slogan h1, p
body #title-slogan-hungry h1, p
It should look like this now:
body #title-slogan h1, p {
overflow: hidden;
margin-top: -21px;
}
body #title-slogan-hungry h1 {
text-indent: 100%;
overflow: hidden;
margin-top: -194px;
padding: 0;
Oh, and you've forgotten opening a <body> tag before header starts.