Getting these responsive square divs to sit next to each other - html

I'm working on a site that is going to look like this:
However, I am having some trouble getting the divs on the third row not to move when I resize the window. To give you an idea of what i'm talking about, here are pictures...
At normal window size:
When I make the window smaller:
How can I make it so that the two divs stay the same as they are in the first picture and don't change position when i adjust the window size. Also, is there any way I can make the text resize along with the div?
Here is my code so far:
#font-face {
font-family: 'Trend Sans 004'; /*a name to be used later*/
src: url('fonts/Trend Sans W00 Four.ttf'); /*URL to font*/
}
#font-face {
font-family: 'Utopia Regular'; /*a name to be used later*/
src: url('fonts/utopia-regular.ttf'); /*URL to font*/
}
#font-face {
font-family: 'Trend Sans 001'; /*a name to be used later*/
src: url('fonts/Trend Sans W00 One.ttf'); /*URL to font*/
}
/*
* Skeleton V2.0.4
* Copyright 2014, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 12/29/2014
*/
/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Grid
- Base Styles
- Typography
- Links
- Buttons
- Forms
- Lists
- Code
- Tables
- Spacing
- Utilities
- Clearing
- Media Queries
*/
/* Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.container {
position: relative;
width: 100%;
max-width: 100%;
margin: 0 auto;
padding: 0 20px;
box-sizing: border-box; }
.column,
.columns {
width: 100%;
float: left;
box-sizing: border-box; }
/* For devices larger than 400px */
#media (min-width: 400px) {
.container {
width: 85%;
padding: 0; }
}
/* For devices larger than 550px */
#media (min-width: 550px) {
.container {
width: 80%; }
.column,
.columns {
margin-left: 4%; }
.column:first-child,
.columns:first-child {
margin-left: 0;
}
.one.column,
.one.columns { width: 4.66666666667%; }
.two.columns { width: 13.3333333333%; }
.three.columns { width: 22%; }
.four.columns { width: 30.6666666667%; }
.five.columns { width: 39.3333333333%; }
.six.columns { width: 48%; }
.seven.columns { width: 56.6666666667%; }
.eight.columns { width: 65.3333333333%; }
.nine.columns { width: 74.0%; }
.ten.columns { width: 82.6666666667%; }
.eleven.columns { width: 91.3333333333%; }
.twelve.columns { width: 100%; margin-left: 0; }
.one-third.column { width: 30.6666666667%; }
.two-thirds.column { width: 65.3333333333%; }
.one-half.column { width: 48%; }
/* Offsets */
.offset-by-one.column,
.offset-by-one.columns { margin-left: 8.66666666667%; }
.offset-by-two.column,
.offset-by-two.columns { margin-left: 17.3333333333%; }
.offset-by-three.column,
.offset-by-three.columns { margin-left: 26%; }
.offset-by-four.column,
.offset-by-four.columns { margin-left: 34.6666666667%; }
.offset-by-five.column,
.offset-by-five.columns { margin-left: 43.3333333333%; }
.offset-by-six.column,
.offset-by-six.columns { margin-left: 52%; }
.offset-by-seven.column,
.offset-by-seven.columns { margin-left: 60.6666666667%; }
.offset-by-eight.column,
.offset-by-eight.columns { margin-left: 69.3333333333%; }
.offset-by-nine.column,
.offset-by-nine.columns { margin-left: 78.0%; }
.offset-by-ten.column,
.offset-by-ten.columns { margin-left: 86.6666666667%; }
.offset-by-eleven.column,
.offset-by-eleven.columns { margin-left: 95.3333333333%; }
.offset-by-one-third.column,
.offset-by-one-third.columns { margin-left: 34.6666666667%; }
.offset-by-two-thirds.column,
.offset-by-two-thirds.columns { margin-left: 69.3333333333%; }
.offset-by-one-half.column,
.offset-by-one-half.columns { margin-left: 52%; }
}
/* Base Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/* NOTE
html is set to 62.5% so that all the REM measurements throughout Skeleton
are based on 10px sizing. So basically 1.5rem = 15px :) */
html {
font-size: 62.5%; }
body {
background-color:#C8D7DC;
}
/* Typography
–––––––––––––––––––––––––––––––––––––––––––––––––– */
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 2rem;
font-weight: 300; }
h1 { font-size: 4.0rem; line-height: 1.2; letter-spacing: -.1rem;}
h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; }
h3 { font-size: 3.0rem; line-height: 1.3; letter-spacing: -.1rem; }
h4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; }
h5 { font-size: 1.8rem; line-height: 1.5; letter-spacing: -.05rem; }
h6 { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0; }
/* Larger than phablet */
#media (min-width: 550px) {
h1 { font-size: 5.0rem; }
h2 { font-size: 4.2rem; }
h3 { font-size: 3.6rem; }
h4 { font-size: 3.0rem; }
h5 { font-size: 2.4rem; }
h6 { font-size: 1.5rem; }
}
p {
margin-top: 0; }
/* Buttons
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
display: inline-block;
height: 38px;
padding: 0 30px;
color: #555;
text-align: center;
font-size: 11px;
font-weight: 600;
line-height: 38px;
letter-spacing: .1rem;
text-transform: uppercase;
text-decoration: none;
white-space: nowrap;
background-color: transparent;
border-radius: 4px;
border: 1px solid #bbb;
cursor: pointer;
box-sizing: border-box; }
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
.button:focus,
button:focus,
input[type="submit"]:focus,
input[type="reset"]:focus,
input[type="button"]:focus {
color: #333;
border-color: #888;
outline: 0; }
.button.button-primary,
button.button-primary,
input[type="submit"].button-primary,
input[type="reset"].button-primary,
input[type="button"].button-primary {
color: #FFF;
background-color: #33C3F0;
border-color: #33C3F0; }
.button.button-primary:hover,
button.button-primary:hover,
input[type="submit"].button-primary:hover,
input[type="reset"].button-primary:hover,
input[type="button"].button-primary:hover,
.button.button-primary:focus,
button.button-primary:focus,
input[type="submit"].button-primary:focus,
input[type="reset"].button-primary:focus,
input[type="button"].button-primary:focus {
color: #FFF;
background-color: #1EAEDB;
border-color: #1EAEDB; }
/* Forms
–––––––––––––––––––––––––––––––––––––––––––––––––– */
input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
height: 38px;
padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
background-color: #fff;
border: 1px solid #D1D1D1;
border-radius: 4px;
box-shadow: none;
box-sizing: border-box; }
/* Removes awkward default styles on some inputs for iOS */
input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
textarea {
min-height: 65px;
padding-top: 6px;
padding-bottom: 6px; }
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
border: 1px solid #33C3F0;
outline: 0; }
label,
legend {
display: block;
margin-bottom: .5rem;
font-weight: 600; }
fieldset {
padding: 0;
border-width: 0; }
input[type="checkbox"],
input[type="radio"] {
display: inline; }
label > .label-body {
display: inline-block;
margin-left: .5rem;
font-weight: normal; }
/* Lists
–––––––––––––––––––––––––––––––––––––––––––––––––– */
ul {
list-style: circle inside; }
ol {
list-style: decimal inside; }
ol, ul {
padding-left: 0;
margin-top: 0; }
ul ul,
ul ol,
ol ol,
ol ul {
margin: 1.5rem 0 1.5rem 3rem;
font-size: 90%; }
li {
margin-bottom: 1rem; }
/* Code
–––––––––––––––––––––––––––––––––––––––––––––––––– */
code {
padding: .2rem .5rem;
margin: 0 .2rem;
font-size: 90%;
white-space: nowrap;
background: #F1F1F1;
border: 1px solid #E1E1E1;
border-radius: 4px; }
pre > code {
display: block;
padding: 1rem 1.5rem;
white-space: pre; }
/* Tables
–––––––––––––––––––––––––––––––––––––––––––––––––– */
th,
td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #E1E1E1; }
th:first-child,
td:first-child {
padding-left: 0; }
th:last-child,
td:last-child {
padding-right: 0; }
/* Spacing
–––––––––––––––––––––––––––––––––––––––––––––––––– */
button,
.button {
margin-bottom: 1rem; }
input,
textarea,
select,
fieldset {
margin-bottom: 1.5rem; }
pre,
blockquote,
dl,
figure,
table,
p,
ul,
ol,
form {
margin-bottom: 2.5rem; }
/* Utilities
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.u-full-width {
width: 100%;
box-sizing: border-box; }
.u-max-full-width {
max-width: 100%;
box-sizing: border-box; }
.u-pull-right {
float: right; }
.u-pull-left {
float: left; }
/* Misc
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Clearing
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Self Clearing Goodness */
.container:after,
.row:after,
.u-cf {
content: "";
display: table;
clear: both; }
/* Media Queries
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/*
Note: The best way to structure the use of media queries is to create the queries
near the relevant code. For example, if you wanted to change the styles for buttons
on small devices, paste the mobile query code up in the buttons section and style it
there.
*/
/* Larger than mobile */
#media (min-width: 400px) {}
/* Larger than phablet (also point when grid becomes active) */
#media (min-width: 550px) {}
/* Larger than tablet */
#media (min-width: 750px) {}
/* Larger than desktop */
#media (min-width: 1000px) {}
/* Larger than Desktop HD */
#media (min-width: 1200px) {}
/* Header
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#header {
font-size:10vw;
margin-top:5%;
text-align: center;
font-family:'Trend Sans 004';
color: #806239;
}
/* Row 1
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#row1 {
font-family:'Trend Sans 001';
color:#806239;
border: 2px #806239 solid;
margin-top:2%;
padding:1%;
font-size:2vw;
white-space: nowrap;
}
#row1 a:link {
text-decoration: none;
color:#806239;
}
#row1 a:visited {
text-decoration: none;
color:#806239;
}
#row1 a:hover {
text-decoration: none;
color:#806239;
}
#row1 a:active {
text-decoration: none;
color:#806239;
}
#row1 ul {
list-style-type: none;
margin: 0;
padding: 0;
text-align: center;
}
#row1 li {
display: inline;
}
#row1 li {
display: inline;
}
#kjn {
padding-right:25%;
padding-left:25%;
}
/* Row 3
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#row3 {
background-color:#806239;
font-family:'Utopia Regular';
margin-top:2%;
text-align:center;
color: white;
padding:5%;
}
#mail {
font-family:'Trend Sans 001';
letter-spacing:2px;
font-size:1.8vw;
}
#first {
margin-top:-5%;
font-size:1.5vw;
letter-spacing:.4px;
}
/* Box Row
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#boxRow {
font-family:'Utopia Regular';
margin-top:2%;
}
#boxRowImg1 {
background-image: url("images/interior.png");
background-color:grey;
background-repeat: no-repeat;
background-size: cover;
font-family:'Utopia Regular';
width: 48%;
height: 0;
padding-bottom: 48%;
}
#boxRowTxt {
font-family:'Utopia Regular';
box-shadow:0px 0px 0px 3px #806239 inset;
width: 48%;
color:#806239;
position:relative;
height: 0;
padding-bottom: 48%;
}
#boxRowTxt h5 {
font-family:'Trend Sans 001';
font-size:3vw;
}
#boxRowTxt p {
margin-top:-20px;
color:#806239;
font-size:10px;
}
#boxRowTxt hr {
height:1px;
width:40%;
background-color:#806239;
border-width:0px;
}
#aa {
padding-top:20px;
padding-bottom:20px;
padding-left:10%;
padding-right:10%;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
/* hr
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#row5 hr {
height:2px;
width:100%;
background-color:#806239;
border-width:0px;
margin-top:3%;
}
/* Row 6
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#row6 {
font-family:'Trend Sans 001';
margin-top:.5%;
margin-bottom:1.5%;
font-size:1.3vw;
color:#806239;
}
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Cupid's Cafe & Bakery</title>
<meta name="description" content="Cupid's Cafe & Bakery">
<meta name="author" content="">
<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="Cupids.css">
<!-- Favicon
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="icon" type="image/png" href="images/favicon.png">
</head>
<body>
<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<div class="container">
<div class="row">
<div class="twelve columns" id="header">
Cupid's
</div>
</div>
<div class="row">
<div class="twelve columns" id="row1">
<ul>
<li>Menu</li>
<li><a id="kjn" href="#about">About</a></li>
<li>Gallery</li>
</ul>
</div>
</div>
<div class="row" id="boxRow">
<div class="six columns" id="boxRowImg1" >
</div>
<div class="six columns" id="boxRowTxt" >
<div id="aa">
<h5>The Cafe</h5></br>
<p>Like a home away from home, our secluded cafe is the perfect place to relax, work, or settle in with a good book. Make sure to try one of our delicious lunch options or expertly brewed hot drinks. </p>
<hr align="left" >
</div>
</div>
</div>
<div class="row">
<div class="twelve columns" id="row5">
<hr width="100%">
</div>
</div>
<div class="row">
<div class="twelve columns" id="row6">
copyright 2016, emily baker
</div>
</div>
</div>
<!-- End Document
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
</body>
</html>

Be careful about this media query :
#media (min-width: 550px)
.column, .columns {
margin-left: 4%;
}
This query add a margin-left when the size of the window is larger than 550px. You have to adapt it to fix your issue ;)
Another solution could be to change the layout when you're with a very small width. For example, putting the two div in a 100% width one above the other.
You can do that with a media query.

For your first question, it seems like the divs snap together when the window hits ~550px wide. More likely than not, its skeleton doing that for you, so I'd look for a media query which changes padding or margin.
As for your second question, yes, you can change the size of the text as the window changes sizes, but whether or not that is something you want for your users is another question. You can look into using rem or percentages for the font-size property of that element.

Related

How do I position a span directly under the email input field given this layout?

I am trying to place the span with the id email-status directly below the email input field, regardless of the viewport size in order to warn users when email is not correct.
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Libre+Franklin:300,600,700&display=swap" rel="stylesheet">
<title>Frontend Mentor | Ping coming soon page</title>
<script defer src="https://friconix.com/cdn/friconix.js"></script>
<script src="index.js"></script>
</head>
<body>
<div class="container">
<div class="content">
<object type="image/svg+xml" data="images/logo.svg" class="logo">
<p class="warning">Your browser does not support SVG. Please update!</p>
</object>
<h1>We are launching <span>soon!</span></h1>
<p>Subscribe and get notified</p>
<form action="#" method="#" class="email-newsletter-form">
<input type="email" name="email" id="email" placeholder="Your email address...">
<span id="email-status">Please enter a valid email</span>
<button type="submit">Notify Me</button>
</form>
<img class="dashboard" src="images/illustration-dashboard.png" alt="Picture of dashboard" />
<footer>
<div class="social-icons">
<i class="fi-xnsuxl-facebook"></i>
<i class="fi-xnsuxl-twitter"></i>
<i class="fi-xnsuxl-instagram"></i>
</div>
<p>© Copyright Ping. All rights reserved.</p>
</footer>
</div>
</div>
</body>
</html>
CSS:
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: "Libre Franklin", sans-serif;
}
#media screen and (min-width: 320px) {
html {
font-size: calc(16px + 6 * ((100vw - 320px) / 680));
}
}
#media screen and (min-width: 1000px) {
html {
font-size: 20px;
}
}
/* Container */
.container {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
margin: 5vh 0 0 0;
}
.container .content {
max-width: 640px;
max-height: 640px;
}
.container h1 {
font-weight: 300;
color: #969696;
}
.container h1 span {
color: #151f29;
font-weight: 700;
}
.container .dashboard {
width: 100%;
}
/* Form */
form {
display: flex;
margin: 30px 0 0 0;
}
input[type=email] {
width: 63%;
border-radius: 40px;
border: 1px solid #c2d3ff;
color: #c2d3ff;
text-indent: 20px;
}
input[type=email]::placeholder {
color: #c2d3ff;
}
input[type=email]:focus {
outline: none;
}
button[type=submit] {
background-color: #4f7df3;
color: #fff;
padding: 0.8rem 3.5rem;
border-radius: 40px;
border: none;
font-weight: bold;
width: 34%;
margin-left: auto;
box-shadow: 5px 8px 15px #c2d3ff;
}
button[type=submit]:focus {
outline: none;
}
button[type=submit]:hover {
opacity: 0.7;
cursor: pointer;
}
#media screen and (max-width: 630px) {
form {
display: block;
margin-bottom: 20px;
}
form input[type=email] {
width: 100%;
padding: 0.8rem 0;
margin-bottom: 20px;
}
form button[type=submit] {
width: 100%;
}
}
#media screen and (max-width: 320px) {
form {
width: 80%;
margin: auto;
padding: 10% 0 20% 0;
}
}
#media screen and (max-width: 229px) {
button[type=submit] {
padding: 0.3rem 3.5rem;
}
}
.dashboard {
margin-top: 10%;
}
.error {
border-color: #a94442;
}
/* Footer */
footer {
color: #969696;
}
footer i {
border-radius: 50%;
border: 1px solid #c2d3ff;
padding: 8px;
width: 16px;
height: 16px;
text-align: center;
font-size: 17px;
}
footer i:hover {
color: #fff;
background-color: #4f7df3;
border: 1px solid #4f7df3;
}
footer a {
color: #4f7df3;
margin-right: 0.7em;
}
Give your button an id like #button and use flex like this:
.email-newsletter-form {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
#button #email {
flex: 1 1 0;
}
#email-status {
order: 3;
}
For mobile devices and smaller viewports use media queries like this:
#media screen and (max-width: 600px) {
#email-status {
order: 0;
}
}

Grid layout not showing

I've been following a responsive web design tutorial and I just cant get my head round this problem. I've included the grid.css file in my html but some how chrome doesnt display it correctly. Instead of grid I get rows like in the attached image. Can someone please help me out with this?
Thank you
No grid
/* --------------------------- */
/* BASIC SETUP */
/* --------------------------- */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
background-color: #fff;
color: #555;
font-family: 'Lato', 'Arial', sans-serif;
font-weight: 300;
font-size: 20px;
text-rendering: optimizeLegibility;
}
/* --------------------------- */
/* REUSABLE COMPONENTS */
/* --------------------------- */
.row {
max-width: 1140px;
margin: 0 auto;
}
section {
padding: 80px 0;
}
/*----- HEADINGS ----- */
h1 {
margin-top: 0;
margin-bottom: 20px;
color: #fff;
font-size: 240%;
font-weight: 300;
text-transform: uppercase;
letter-spacing: : 1px;
word-spacing: 4px;
}
/*----- BUTTONS ----- */
.btn:link,
.btn:visited {
display: inline-block;
padding: 10px 30px;
font-weight: 300;
text-decoration: none;
border-radius: 200px;
color: #fff;
transition: background-color 0.2s, border 0.2s, color 0.2s;
}
.btn-full:link,
.btn-full:visited {
background-color: #e67e22;
border: 1px solid #e67e22;
color: #fff;
margin-right: 15px;
}
.btn-ghost:link,
.btn-ghost:visited{
border: 1px solid #e67e22;
color: #e67e22;
}
.btn:hover,
.btn:active {
background-color: #cf6d17;
}
.btn-full:hover,
.btn-full:active {
border: 1px solid #cf6d17;
}
.btn-ghost:hover,
.btn-ghost:active {
border: 1px solid #cf6d17;
color: #fff;
}
/* --------------------------- */
/* HEADER */
/* --------------------------- */
header {
background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(img/hero.jpg);
background-size: cover;
background-position: center;
height: 100vh;
}
.hero-text-box {
position: absolute;
width: 1140px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.logo {
height: 100px;
width: auto;
float:left;
margin-top: 20px;
}
.main-nav {
float:right;
list-style: none;
margin-top: 55px;
}
.main-nav li {
display: inline-block;
margin-left: 40px;
}
.main-nav li a:link,
.main-nav li a:visited {
padding: 8px 0px;
color: #fff;
text-decoration:none;
text-transform: uppercase;
font-size: 90%;
border-bottom: 2px solid transparent;
transition: border-bottom 0.2s;
}
.main-nav li a:hover,
.main-nav li a:active {
border-bottom: 2px solid #cf6d17;
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="vendors-stuff%2520downloaded%2520from%2520Internet/css_downloaded/normalize.css">
<link rel="stylesheet" type="text/css" href="vendors-stuff%2520downloaded%2520from%2520Internet/css_downloaded/grid.css">
<link rel="stylesheet" type="text/css" href="resources/css/style.css">
<link href="https://fonts.googleapis.com/css?family=Lato:100,300,300i,400" rel="stylesheet" type="text/css">
<title>Omnifood</title>
</head>
<body>
<header>
<nav>
<div class="row">
<img src="resources/css/img/logo-white.png" alt="Omnifood logo" class="logo">
<ul class="main-nav">
<li>Food delivery</li>
<li>How it works</li>
<li>Our cities</li>
<li>Sign up</li>
</ul>
</div>
</nav>
<div class="hero-text-box">
<h1>Goodbye junk food.<br> Hello super healthy meals</h1>
<a class="btn btn-full" href="#">I'm hungry</a>
<a class="btn btn-ghost" href="#">Show me more</a>
</div>
</header>
<section class="section-features">
<div class="row">
<h2>Get food fast — not fast food.</h2>
<p class="long-copy">
Hello, we’re Omnifood, your new premium food delivery service. We know you’re always busy. No time for cooking. So let us take care of that, we’re really good at it, we promise!
</p>
</div>
<div class="row">
<div class="col span-1-of-4">
<h3>Up to 365 days/year</h3>
<p>
Never cook again! We really mean that. Our subscription plans include up to 365 days/year coverage. You can also choose to order more flexibly if that's your style.
</p>
</div>
<div class="col span-1-of-4">
<h3>Ready in 20 minutes</h3>
<p>
You're only twenty minutes away from your delicious and super healthy meals delivered right to your home. We work with the best chefs in each town to ensure that you're 100% happy.
</p>
</div>
<div class="col span-1-of-4">
<h3>100% organic</h3>
<p>
All our vegetables are fresh, organic and local. Animals are raised without added hormones or antibiotics. Good for your health, the environment, and it also tastes better!
</p>
</div>
<div class="col span-1-of-4">
<h3>Order anything</h3>
<p>
We don't limit your creativity, which means you can order whatever you feel like. You can also choose from our menu containing over 100 delicious meals. It's up to you!
</p>
</div>
</div>
</section>
</body>
</html>
/* SECTIONS ============================================================================= */
.section {
clear: both;
padding: 0px;
margin: 0px;
}
/* GROUPING ============================================================================= */
.row {
zoom: 1; /* For IE 6/7 (trigger hasLayout) */
}
.row:before,
.row:after {
content:"";
display: table;
}
.row:after {
clear:both;
}
/* GRID COLUMN SETUP ==================================================================== */
.col {
display: block;
float:left;
margin: 1% 0 1% 1.6%;
}
.col:first-child { margin-left: 0; } /* all browsers except IE6 and lower */
/* REMOVE MARGINS AS ALL GO FULL WIDTH AT 480 PIXELS */
#media only screen and (max-width: 480px) {
.col {
/*margin: 1% 0 1% 0%;*/
margin: 0;
}
}
/* GRID OF TWO ============================================================================= */
.span-2-of-2 {
width: 100%;
}
.span-1-of-2 {
width: 49.2%;
}
/* GO FULL WIDTH AT LESS THAN 480 PIXELS */
#media only screen and (max-width: 480px) {
.span-2-of-2 {
width: 100%;
}
.span-1-of-2 {
width: 100%;
}
}
/* GRID OF THREE ============================================================================= */
.span-3-of-3 {
width: 100%;
}
.span-2-of-3 {
width: 66.13%;
}
.span-1-of-3 {
width: 32.26%;
}
/* GO FULL WIDTH AT LESS THAN 480 PIXELS */
#media only screen and (max-width: 480px) {
.span-3-of-3 {
width: 100%;
}
.span-2-of-3 {
width: 100%;
}
.span-1-of-3 {
width: 100%;
}
}
/* GRID OF FOUR ============================================================================= */
.span-4-of-4 {
width: 100%;
}
.span-3-of-4 {
width: 74.6%;
}
.span-2-of-4 {
width: 49.2%;
}
.span-1-of-4 {
width: 23.8%;
}
/* GO FULL WIDTH AT LESS THAN 480 PIXELS */
#media only screen and (max-width: 480px) {
.span-4-of-4 {
width: 100%;
}
.span-3-of-4 {
width: 100%;
}
.span-2-of-4 {
width: 100%;
}
.span-1-of-4 {
width: 100%;
}
}

CSS float rules and responsive - Fiddle Included

ATM I am developing a site and focusing on mobile view to start with:
On my second grid div I having issues ensuing the image appears opposite to the container above, if I float the image right, when I go passed 350 pixels viewport width all of the children elements start shifting in relation to the left hand UL which is not what I want.
Essentially I want each alternating grid divs list and images to be alternating positions but I would like my price and buttons to stay central, just like the first container.
Apologies if unclear, describing the problem is not strong point.
All markup and CSS in fiddle.
https://jsfiddle.net/Evilmop44/axpfp1oq/28/
HTML
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/mobile.css">
</head>
<body>
<!-- Add your site or application content here -->
<div id="carSelector">
<p class = "companyBlurb"> <strong>Tees Used Motors </strong> offer a small but quality range of used vehicles across all price ranges.<br>
You can buy with confidence as all of our vehicles come with: <br>
<strong>12 Months MOT<br>
6 Months RAC Warranty<br>
HPI Check<br></strong>
Part Ex considered and vehicle delivery available. <br>
</p>
<p class = "clickDescription"> Click here to see our the best vehicles in our range.</p>
<div id="carSelectModule">
<select name="cars">
<option value="defaultManufactuer" selected = "selected">Manufacturer</option>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>
<select name="price">
<option value="defaultPrice" selected = "selected">Price</option>
<option value="lessThan1000">Less than £1,000</option>
<option value="2000to3000">£1,000 to £2,000</option>
<option value="2000to3000">£2,000 to £3,000</option>
<option value="moreThan4000">More than £4,000</option>
</select>
</div>
</div>
<div id="gridAds">
<div>
<h1 class="carTitle">Vauxhall Astra 1.4 i Turbo 16v SRi Nav (s/s) 5dr</h1>
<div class = "addBox1"> <img class="carAdImg" src="img/car.jpg"/></div>
<ul class = carSpecListR>
<li>Up To 62.8MPG</li>
<li>Apple Car Play</li>
<li>10,553 miles from new</li>
<li>Automatic</li>
<li>148bhp</li>
<li>Petrol</li>
</ul>
<p class = "carPrice">Only £4,299</p>
<button type="button" class="adButtonleft">View Vehicle</button>
</div>
<div>
<h1 class="carTitle">Vauxhall Astra 1.4 i Turbo 16v SRi Nav (s/s) 5dr</h1>
<ul class = carSpecListL>
<li>Up To 62.8MPG</li>
<li>Apple Car Play</li>
<li>10,553 miles from new</li>
<li>Automatic</li>
<li>148bhp</li>
<li>Petrol</li>
</ul>
<div class = "addBox2">
<img class="carAdImgRight" src="img/car.jpg"/>
</div>
<p class = "carPrice">Only £4,299</p>
<button type="button" class="adButtonleft">View Vehicle</button>
</div>
<div>
<h1 class="carTitle">I am car</h1>
<div class="addBox1">Advert Images</div>
<div class="addBox1">Text Content</div>
<button type="button" class="adButtonleft">View Vehicle</button>
</div>
<div>
<h1 class="carTitle">I am car</h1>
<div class="addBox1">Advert Images</div>
<div class="addBox1">Text Content</div>
<button type="button" class="adButtonright">View Vehicle</button>
</div>
</div>
<script src="js/vendor/modernizr-3.5.0.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.2.1.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
window.ga = function () {
ga.q.push(arguments)
};
ga.q = [];
ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
</body>
</html>
CSS
Base styles: opinionated defaults
========================================================================== */
html {
color: #222;
font-size: 1em;
line-height: 1.4;
}
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
/*
* A better looking default horizontal rule
*/
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
/*
* Remove the gap between audio, canvas, iframes,
* images, videos and the bottom of their containers:
* https://github.com/h5bp/html5-boilerplate/issues/440
*/
audio,
canvas,
iframe,
img,
svg,
video {
vertical-align: middle;
}
/*
* Remove default fieldset styles.
*/
fieldset {
border: 0;
margin: 0;
padding: 0;
}
/*
* Allow only vertical resizing of textareas.
*/
textarea {
resize: vertical;
}
/* ==========================================================================
Browser Upgrade Prompt
========================================================================== */
.browserupgrade {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
/* ==========================================================================
Author's custom styles
========================================================================== */
#gridAds {
grid-template-columns: 1fr;
grid-gap: 0.5em;
display: grid;
}
#gridAds > div {
background: #d4d4d4;
padding: 1em;
box-sizing: border-box;
border: 2px solid white
}
#gridAds > div:nth-child(odd){
background: #f3f4f6;
}
#carSelector {
width: 100%;
background-color: #0060a7;
height: auto;
text-align: center;
}
#carSelectModule {
position: relative;
text-align: center;
padding-top: 1em;
padding-bottom: 1em;
}
.adRightBox {
width: auto;
}
.addBox1 {
display: inline-block;
width: 48%;
margin: 0em auto;
height: auto;
min-width: 48%;
}
.addBox2 {
display: inline;
width: 48%;
margin: 0em auto;
height: auto;
min-width: 48%;
float: right;
}
.adButtonright {
background-color: rgba(173, 216, 230, 0.25);
border-color: rgba(0, 96, 167, 0.35);
border-radius:0.2em;
padding: 0.4em;
position: relative;
display: block;
font-size: 1em;
margin: 0em auto;
cursor: pointer;
}
.adButtonright:hover {
background-color: lightblue;
box-shadow: #cccccc;
}
.adButtonleft {
background-color: rgba(173, 216, 230, 0.25);
border-color: rgba(0, 96, 167, 0.35);
border-radius:5px;
padding: 0.4em;
display: block;
font-size: 1em;
margin: 0 auto;
cursor: pointer;
}
.adButtonleft:hover {
background-color: lightblue;
}
.companyBlurb {
border: 0px; color: #f3f4f6;
padding: 2em;
box-sizing: border-box;
max-width: 70%;
font-size: 0.7em;
line-height: 1.6;
}
.carTitle{
text-align: left;
font-size: 20px;
}
.carAdImg{
display: inline-block;
margin: auto;
max-width: 100%;
float:right;
}
.carAdImgRight{
display: inline-block;
margin: auto;
max-width: 100%;
float:right;
}
.carSpecListR {
font-size: 0.7em;
list-style: none;
display: inline-block;
float: right;
line-height: 1.2;
vertical-align: middle;
}
.carSpecListL {
font-size: 0.7em;
list-style: none;
position: relative;
display: inline-block;
padding-left: 0.2em;
line-height: 1.2;
margin-right: 2em;
vertical-align: middle;
}
.carPrice {
font-size: 1em;
font-style: oblique;
font-weight: bold;
display:block;
padding: 0.5em;
}
.clickDescription {
border: 0px; color: #f3f4f6;
padding: 0.5em;
box-sizing: border-box;
max-width: fit-content;
line-height: 1.6;
font-size: 1em;
background-color: #f3f4f6;
color: #0060a7;
}
p {
font-size: 12px;
margin: 0 auto;
text-align: center;
padding: 1%;
}
/* ==========================================================================
Helper classes
========================================================================== */
/*
* Hide visually and from screen readers
*/
.hidden {
display: none !important;
}
/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
* causes content to wrap 1 word per line:
* https://medium.com/#jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap; /* 1 */
}
/*
* Extends the .visuallyhidden class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
-webkit-clip-path: none;
clip-path: none;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
white-space: inherit;
}
/*
* Hide visually and from screen readers, but maintain layout
*/
.invisible {
visibility: hidden;
}
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.clearfix:after {
clear: both;
}
/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */
#media only screen and (min-width: 35em) {
/* Style adjustments for viewports that meet the condition */
}
#media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
/* Style adjustments for high resolution devices */
}
/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
http://www.phpied.com/delay-loading-your-print-css/
========================================================================== */
#media print {
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important; /* Black prints faster:
http://www.sanbeiji.com/archives/953 */
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
/*
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/
a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}
pre {
white-space: pre-wrap !important;
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
/*
* Printing Tables:
* http://css-discuss.incutio.com/wiki/Printing_Tables
*/
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}
Thanks
https://jsfiddle.net/axpfp1oq/24/
.carPrice clear:both to make floats more predictable
.carSpecListR - remove default css margin and padding and add max width to the block to control floats
do the same for carSpecListL
.carSpecListR {
font-size: 0.7em;
list-style: none;
display: inline-block;
float: right;
line-height: 1.2;
vertical-align: middle;
margin:0;
padding:0;
max-width:50%;
}
.carPrice {
font-size: 1em;
font-style: oblique;
font-weight: bold;
display:block;
padding: 0.5em;
clear: both;
}

Text isn't minimizing with screen HTML/CSS

I hope someone can help! When I minimize the browser screen on this code, everything is minimizing appropriately except for my body text. Not sure why this is happening! Can anybody find the issue in the HTML or CSS?
The HTML:
<!DOCTYPE html>
<!--
Ex Machina by TEMPLATED
templated.co #templatedco
Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
-->
<html>
<head>
<title>History: Skating Today</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<meta content="" name="description">
<meta content="" name="keywords">
<!--[if lte IE 8]><script src="js/html5shiv.js"></script><![endif]-->
<script src=
"http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
</script>
<script src="js/skel.min.js">
</script>
<script src="js/skel-panels.min.js">
</script>
<script src="js/init.js">
</script> <noscript>
<link href="css/style.css" rel="stylesheet">
<style type="text/css">
.header {
}
</style></noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
<!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
</head>
<body class="page">
<!-- Header -->
<div id="page">
<img alt="Black and white photo of boy skateboarding" height="" src=
"images/OldTimey.jpg" width="100%">
<div class="unit header">
<section>
<header>
<h3>Unit 1: Skateboarding, Then and Now<br>
Lesson 1/3</h3>
</header>
</section>
</div><!-- Main -->
<div class="container" id="main">
<div class="row">
<div class="3u">
<section class="sidebar">
<h4>Home</h4>
</section>
<section class="sidebar">
<h4><a href="Programme%20Overview.html">Programme
Overview</a></h4>
</section>
<section class="sidebar">
<h4><a href="Unit1.html">Unit 1: Skateboarding, Then
and Now</a></h4>
<ul class="style3">
<li><a href="History.html">Lesson 1: History of
Skateboarding</a></li>
<li><a href="Types.html">Lesson 2: Types of
Skating</a></li>
<li>Unit 1 Quiz</li>
</ul>
</section>
<section class="sidebar">
<h4><a href="Unit2.html">Unit 2: Why You Should
Skate</a></h4>
<ul class="style3">
<li><a href="EmotionalBenefits.html">Lesson 1:
Emotional and Physical Benefits</a></li>
<li><a href="SocialBenefits.html">Lesson 2: Social
and Enviromental Benefits (Plus a Few
More!)</a></li>
<li>Unit 2 Quiz</li>
</ul>
</section>
<section class="sidebar">
<h4>Unit 3: Safety & Upkeep</h4>
<ul class="style3">
<li><a href="SafePlace.html">Lesson 1: Determining Safe Places
to Skate</a></li>
<li><a href="Stopping.html">Lesson 2: How to Stop a
Board</a></li>
<li><a href="Rules.html">Lesson 3: Rules of the
Road</a></li>
<li>Lesson 4: Changing Your Bearings</li>
<li>Lesson 5: Adjusting Your Trucks</li>
</ul>
</section>
<section class="sidebar">
<h4>Extras: Skating Routes & Meet a Skater</h4>
<ul class="style3">
<li>From the Flag Poles</li>
<li>From the White Gates</li>
<li>From the Pavilion</li>
<li>Meet a Skater</li>
</ul>
</section>
</div>
<div class= "9u skel-cell-important"">
<header>
<h3>Skating Today</h3>
</header>
<p> While some people may still see skaters as
rebellious or alternative, skateboarding has once
again evolved. In places like Afghanistan, where
girls are not allowed to ride bikes but can
skateboard, the sport is used to engage and empower
youth (skateistan.org). Furthermore, although many
skaters still take part in skateboarding to perfect
tricks and take risks, skateboarding has become the
way that many people get from point A to point B.</p>
<p></p>
<p>While any type of skateboard may be used for
transportation, the longboard is having its heyday.
A longboard can range anywhere from 33 to 80 inches
and typically has softer wheels, making for a
smoother and more stable ride, perfect for
cruising, less experienced, and older skaters
(Ruibal 2006).</p>
<img src="images/header.jpg" width="736" height="189" alt=""/><br>
<div id="course description">
<br>
<p>This lesson is now complete. To continue to lesson 2, "Types of Skating", click <a href=
"Types.html">next</a>.</p>
</div>
</div>
</section>
</div><!-- Main -->
</div>
</div>
</div>
</body>
</html>
And the CSS:
#charset "UTF-8";
/*
Ex Machina by TEMPLATED
templated.co #templatedco
Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
*/
/*********************************************************************************/
/* Basic */
/*********************************************************************************/
body {
background-image: url(../images/BackgroundImage.jpg);
}
body,input,textarea,select {
font-family: Verdana,Geneva,sans-serif;
font-weight: 300;
font-size: 16px;
line-height: 1.5em;
}
h1,h2,h3,h4,h5,h6 {
letter-spacing: 1px;
font-weight: 300;
color: #1b1b5e;
}
h4
{
letter-spacing: 1px;
font-weight: 700;
color: #1b1b5e;
}
/* Change this to whatever font weight/color pairing is most suitable */
strong,b {
font-weight: 700;
color: #000;
}
em,i {
font-style: italic;
}
/* Don't forget to set this to something that matches the design */
a {
color: blue;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
sub {
position: relative;
top: .5em;
font-size: .8em;
}
sup {
position: relative;
top: -.5em;
font-size: .8em;
}
hr {
border: 0;
border-top: solid 1px #ddd;
}
blockquote {
border-left: solid .5em #ddd;
padding: 1em 0 1em 2em;
font-style: italic;
}
p,ul,ol,dl,table {
margin-right: ;
margin-bottom: 1em;
color: #1b1b5e;
}
tr. highlight td {
padding: 2em;
}
header {
margin-bottom: .5em;
line-height: 2.5em;
color: #1b1b5e;
}
header h2 {
font-size: 24px;
text-align: left;
}
header h3 {
font-size: 22px;
}
footer {
margin-top: 1em;
}
/* Sections/Articles */
section,article {
margin-bottom: 1em;
}
.row
{
padding: 0;
position; center;
}
.intro {
text-align: left;
padding-bottom: 2em;
font-weight: 700;
}
.aims {
padding-top: 2px;
}
.unit header {
text-align: right;
margin-right: 1em;
color: purple;
}
table,th,td {
border: ;
border-collapse: collapse;
align-content: center;
}
th,td {
padding: 5px;
}
.boxed {
border: 1px solid #000;
padding: 2%;
margin-right: 10%;
margin-bottom: 2em;
}
* {
margin: 0;
padding: 0;
outline: none;
}
.formativequiz {
margin-top: 10px;
margin-bottom: 10px;
padding: 10px;
background: ;
text-align: left;
}
.formativequiz h1 {
font: bold;
}
.formativequiz p {
font: bold;
}
.question {
overflow: auto;
margin: ;
width: 80%;
background: #fff;
}
.question h2 {
float: left;
margin: 0 40px;
color: blue;
font: bold;
}
.question h2:hover {
color: #333;
cursor: pointer;
}
.question p {
float: left;
margin-right: 0;
color: #fff;
font: bold 0;
-webkit-transition: color .3s ease;
-moz-transition: color .3s ease;
-ms-transition: color .3s ease;
-o-transition: color .3s ease;
transition: color .3s ease;
}
h2:active ~ .yes {
color: #1b1b5e;
font-size: ;
}
.course description {
margin-bottom: 3em;
padding-right: 10%;
}
#icons {
height: 128;
text-align: justify;
border: none;
font-size: .1px;
/* IE 9 & 10 don't like font-size: 0; */
max-width: 888px;
}
#icons div {
display: inline-block;
margin-top: 3em;
margin-bottom: 3em;
padding-right: 10%;
}
#icons:after {
content: '';
width: 100%;
/* Ensures there are at least 2 lines of text, so justification works */
display: inline-block;
}
/* Images */
.image {
display: block;
margin: 2em;
}
.image img {
display: block ;
width: ;
margin: 2em;
padding: 2em;
}
.image.featured {
display: block;
width: 100%;
margin: 0;
}
.image.full {
display: block;
width: 100%;
margin-bottom: 2em;
}
.image.left {
float: left;
margin: 0 2em .8em 0;
}
.image.centered {
display: block;
margin: 0 0 .8em;
}
.image.centered img {
margin: 0 auto;
width: auto;
}
/* Lists */
ul.default {
margin-bottom: 0;
padding-bottom: 0;
list-style: none;
}
ul.default li {
display: block;
padding: 2em 0 1.25em;
border-top: 1px solid #303030;
}
ul.default li:first-child {
padding-top: 0;
border-top: none;
}
ul.default a {
text-decoration: none;
color: rgba(255,255,255,.5);
}
ul.default a:hover {
}
ul.style1 {
margin: 0;
padding: 0;
list-style: none;
}
ul.style1 li {
padding: .6em 0;
}
ul.style1 li:first-child {
padding-top: 0;
border-top: 0;
}
ul.style1 img {
}
ul.style2 {
text-align: left;
margin-right: 10%;
padding: 2%;
list-style: disc;
padding-bottom: 1em;
}
ul.style2 li {
padding: .5em 0 0;
list-style-position: inside;
}
ul.style2 li:first-child {
padding-top: 0;
border-top: 0;
}
ul.style3 {
margin: 0;
padding: 5px;
list-style: none;
font: 14px;
}
ul.style3 li {
padding-left: .6em;
line-height: 150%;
}
ul.style3 li:first-child {
padding-top: 0;
border-top: 0;
}
ul.style5 {
overflow: hidden;
margin: 0 0 1em;
padding: 0;
list-style: none;
}
ul.style5 li {
float: left;
padding: .25em;
line-height: 0;
}
ul.style5 a {
}
/*********************************************************************************/
/* Header */
/*********************************************************************************/
/*********************************************************************************/
/* Main */
/*********************************************************************************/
#page {
margin: 7em;
position: center;
background: #fff;
}
#main {
padding: 1em;
}
#container {
position: center;
margin: 1em;
padding: 1em;
}
/*********************************************************************************/
/* Icons */
/*********************************************************************************/
.greenleaf {
align-content: relative;
}
.trafficlight {
align-content: relative;
}
.pinkskater {
}
.map {
}
Add media queries to your CSS to define you font sizes for various window sizes. Here's a simple example from this post (written in Sass):
html {
font-size: 16px;
#media (min-width: 800px) {
font-size: 18px;
}
#media (min-width: 1200px) {
font-size: 20px;
}
}
The problem appears to be that in your css you set the font size of body in pixels. try changing it to em instead of px and it should adjust in size. But it's hard to tell with so much going on.

Sticky CSS Footer

Can someone help me make the original code from HTML5 Boilerplate Initializser, have the footer stick to the bottom of the browser, I've tried all manor of codes from web examples but unfortunately I think as usual the boiler plates predefined CSS is affecting the positioning and "sticking" of the footer.
Heres my CSS:
/* =============================================================================
HTML5 Boilerplate CSS: h5bp.com/css
========================================================================== */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }
[hidden] { display: none; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; height: 100%;}
html, button, input, select, textarea { font-family: sans-serif; color: #222; }
body { margin: 0; font-size: 0.9em; line-height: 1.4; height: 100%;}
::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
::selection { background: #fe57a1; color: #fff; text-shadow: none; }
a { color: #00e; }
a:visited { color: #551a8b; }
a:hover { color: #06e; }
a:focus { outline: thin dotted; }
a:hover, a:active { outline: 0; }
abbr[title] { border-bottom: 1px dotted; }
b, strong { font-weight: bold; }
blockquote { margin: 1em 40px; }
dfn { font-style: italic; }
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
ins { background: #ff9; color: #000; text-decoration: none; }
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 0.9em; }
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
q { quotes: none; }
q:before, q:after { content: ""; content: none; }
small { font-size: 85%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
dd { margin: 0 0 0 40px; }
nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }
img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
svg:not(:root) { overflow: hidden; }
figure { margin: 0; }
form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }
label { cursor: pointer; }
legend { border: 0; *margin-left: -7px; padding: 0; white-space: normal; }
button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
button, input { line-height: normal; }
button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; *overflow: visible; }
button[disabled], input[disabled] { cursor: default; }
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; *width: 13px; *height: 13px; }
input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
textarea { overflow: auto; vertical-align: top; resize: vertical; }
input:valid, textarea:valid { }
input:invalid, textarea:invalid { background-color: #f0dddd; }
table { border-collapse: collapse; border-spacing: 0; }
td { vertical-align: top; }
.chromeframe { margin: 0.2em 0; background: #ccc; color: black; padding: 0.2em 0; }
/* ===== Initializr Styles =====================================================
Author: Jonathan Verrecchia - verekia.com/initializr/responsive-tfont-sizeplate
========================================================================== */
body{ font:16px/26px Helvetica, Helvetica Neue, Arial; }
.wrapper{
width:90%;
margin:0 5%;
min-height: 100%;
}
/* ===================
ALL: Blue Theme
=================== */
#header-container{ border-bottom: 20px solid #22558b; width:100% }
#footer-container{ border-top: 20px solid #22558b; width:100%}
#main aside { border-top: 20px solid #22558b; }
#header-container,
#footer-container,
#main aside{
background:#2c6cb1;
}
#title{color:white; }
::-moz-selection { background: #2c6cb1; color: #fff; text-shadow: none; }
::selection { background: #2c6cb1; color: #fff; text-shadow: none; }
/* ==============
MOBILE: Menu
============== */
nav a{
display:block;
margin-bottom:10px;
padding:15px 0;
background:#22558b;
color:white;
text-align:center;
text-decoration:none;
font-weight:bold;
}
nav a:hover, nav a:visited{
color:white;
}
nav a:hover{
text-decoration:underline;
}
/* ==============
MOBILE: Main
============== */
#main{
padding:30px 0;
}
#main article h1{
font-size:2em;
}
#main aside{
color:white;
padding:0px 5% 10px;
}
#footer-container footer{
color:white;
padding:20px 0;
clear:both;
}
/* ===============
ALL: IE Fixes
=============== */
.ie7 #title{ padding-top:20px; }
/* ===== Primary Styles ========================================================
Author: Christopher Leah of Happy Webs LTD - 07/2012
========================================================================== */
.btn{clear:left;float:left; width:79px; margin-left:5px; margin-bottom:2px;}
.ColHead{float:left; width:50px; margin-left:5px; background-color:#22558B;color:#ffffff;margin-bottom:2px;}
.RowHead{clear:left;float:left; width:75px; margin-left:5px;background-color:#2C6CB1;color:#ffffff;margin-bottom:2px;}
.gridBoxes{float:left; width:50px; margin-left:5px; margin-bottom:2px;}
.graph{margin-top:10px;float:left;}
h3.left {float: left; width:49%;}
h3.right {float: right; width:49%; text-align:right;}
#footer-container a { color:#fff; text-decoration:none; }
#footer-container a:hover { text-shadow: 1px 1px 1px #000; }
.txtSmall {width:50px;}
#title a{color:#fff; text-shadow: 1px 1px 1px #000; text-decoration:none;}
.disclaimer { font-size:0.8em;}
.disclaimer a{ color:#22558B;}
/* =============================================================================
Media Queries
========================================================================== */
#media only screen and (min-width: 480px) {
/* ====================
INTERMEDIATE: Menu
==================== */
nav a{
float:left;
width:27%;
margin:0 1.7%;
padding:25px 2%;
margin-bottom:0;
}
nav li:first-child a{ margin-left:0; }
nav li:last-child a{ margin-right:0; }
/* ========================
INTERMEDIATE: IE Fixes
======================== */
nav ul li{
display:inline;
}
.oldie nav a{
margin:0 0.7%;
}
}
#media only screen and (min-width: 768px) {
/* ====================
WIDE: CSS3 Effects
==================== */
#header-container,
#main aside{
-webkit-box-shadow:0 5px 10px #aaa;
-moz-box-shadow:0 5px 10px #aaa;
box-shadow:0 5px 10px #aaa;
}
/* ============
WIDE: Menu
============ */
#title{
float:left;
text-shadow: 1px 1px 1px #000;
}
nav{
float:right;
width:38%;
}
/* ============
WIDE: Main
============ */
#main article{
float:left;
width:57%;
}
#main aside{
float:right;
width:28%;
}
}
#media only screen and (min-width: 1140px) {
/* ===============
Maximal Width
=============== */
.wrapper{
width:1026px; /* 1140px - 10% for margins */
margin:0 auto;
}
}
/* =============================================================================
Non-Semantic Helper Classes
========================================================================== */
.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
.ir br { display: none; }
.hidden { display: none !important; visibility: hidden; }
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
.invisible { visibility: hidden; }
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }
/* =============================================================================
Print Styles
========================================================================== */
#media print {
* { background: transparent !important; color: black !important; box-shadow:none !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
a, a:visited { text-decoration: underline; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* h5bp.com/t */
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
#page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3 { page-break-after: avoid; }
}
Heres my HTML:
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head id="Head1"><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><title>
Home - Upper Control Limit
</title><meta name="description" /><meta name="author" /><meta name="viewport" content="width=device-width" /><link rel="stylesheet" href="css/style.css" />
<script src="js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
</head>
<body>
<div id="header-container">
<header class="wrapper clearfix">
<h1 id="title">Upper Control Limit</h1>
<nav>
<ul>
<li>Home</li>
<li>Contact</li>
</ul>
</nav>
</header>
</div>
<div id="main-container">
<form method="post" action="default.aspx" id="Form1" enctype="multipart/form-data">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUIMzI4MjE1NjZkZO1bVtBx0KanNtHBuPKe20ZygwvsWgeEn3cRtL/CrOHU" />
</div>
<div class="aspNetHidden">
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBQK3heD7DwLHyoqxBgLHyuK8AQKDw8wMAt3oqtEMt6vvVJr549pcOORe6AIL/bfdHDA/UvYWb5jzHlW8pc0=" />
</div>
<div id="main" class="wrapper clearfix">
<article>
<section>
<h2>Manual Data Entry</h2>
<label>Rows: </label><input name="ctl00$MainContent$txtRows" type="text" id="MainContent_txtRows" class="txtSmall" />
<label>Cols: </label><input name="ctl00$MainContent$txtCols" type="text" id="MainContent_txtCols" class="txtSmall" />
<p><em>*Maximum of 10 rows and/or 30 columns for this trial version.</em></p>
<p><input type="submit" name="ctl00$MainContent$btnGo" value="Go" id="MainContent_btnGo" /></p>
<br />
</section>
<section>
<h2>File Uploader</h2>
<p><input type="file" name="ctl00$MainContent$flUp" id="MainContent_flUp" /> </p>
<p>(Maximum File Size: 3KB)<br /><em>*Do not include any column headers or text in your CSV.</em></p>
<p><input type="submit" name="ctl00$MainContent$btnUpload" value="Upload" id="MainContent_btnUpload" /></p>
<br />
</section>
<section>
<h3>Disclaimer</h3>
<p class="disclaimer">Data uploaded or manually entered, is deleted immediately
after processing. If you have concerns over your data or privacy, please read our disclaimer.<br />If your data contains sensitive information, you should consider
integrating the UCL engine within your system. Please contact us for more information. <br /></p>
</section>
</article>
<aside>
<h3>About UCL</h3>
<p>Control Charts have multiple applications in a wide variety of industries. They
can help measure the effectiveness of manufacturing processes or the quality of
service based industry.</p>
<p>The UCL calculator has been developed by Data-Exchange Ltd as a side project
which was driven by the need to integrate this magic formula within various
business applications.</p>
<h4>Upper Control Limit Formula</h4>
<p><img src="img/ucl-formula.png" title="Upper Control Limit Formula" alt="Upper Control Limit Formula: X + 2.66* MR" /></p>
<h4>Lower Control Limit Formula</h4>
<p><img src="img/lcl-formula.png" title="Lower Control Limit Formula" alt="Lower Control Limit Formula: X - 2.66* MR" /></p>
</aside>
</div>
</form>
</div> <!-- #main-container -->
<div id="footer-container">
<footer class="wrapper clearfix">
<h3 class="left">Copyright © 2012 Data Exchange Ltd</h3>
<h3 class="right"><a href="http://www.perfect-flow.com/" title="PerfectFlow Ltd" ><img alt="PerfectFlow" border="0" src="img/perfectflow.gif" /></a></h3>
</footer>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script> window.jQuery || document.write('<script src="js/libs/jquery-1.7.2.min.js"><\/script>')</script>
<script src="js/script.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17073042-4']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
Thanks for any help guys!
If your styles come after the CSS from Boilerplate, that should apply. It's the beauty of CASCADING stylesheets. Trying using position:fixed and bottom:0px for your footer.
#footer-container {
position:fixed;
bottom:0px;
width:100%;
}
Take the BP, then add the additional markup stated on this page: http://www.cssstickyfooter.com/html-code.html. Then, add the appropriate CSS. If you view it in tree mode via Firebug, it will help. After you getting working with the additional markup, see if you can repurpose your existing markup to clean things up a bit.
Try doing something to this effect...
#footer-container {
position:fixed;
bottom:0px;
}
The best way for having a sticky footer in an elegant way without any workaround you should use this css code:
#footer{
position:fixed;
clear:both;
}