CSS GridView issue - html

I'm doing something wrong with the css code and it doesn't look the way I wanted. I attached a link to the post to see how it is supposed to look like and a picture to see how it looks like now. I'm posting the HTML code as well as CSS code. I tried to find what I'm doing wrong but after spending 2 hours, trying to find what is wrong, I finally gave up and I started to look for help.
How it should look like
Current design
HTML
<header>
<img src="pc_logo.png" alt="Pandaisia Chocolates" />
<nav class="horizontal">
<ul>
<li>Home</li>
<li>The Store</li>
<li>My Account</li>
<li>Specials</li>
<li>Reviews</li>
<li>Contact Us</li>
</ul>
</nav>
</header>
<div class="newRow">
<div class="col-2-3">
<article id="intro">
<h1>March Specials</h1>
<p>Spring is coming and we've got some mouth-watering specials to help you celebrate the change in seasons in style! Featured throughout March is our always-popular Chocolate Covered Strawberries / Rose Fruit Syrup Combo, now at the special low price
of $29.95. For that special someone, consider our Red Rose Select box of Spring chocolates. Remember that for every order of $25 or more, you receive a free truffle of your choice. For orders of $100 or more we throw in a four-piece gift box of
our signature chocolates and truffles.</p>
</article>
<div class="newRow">
<div class="col-1-3 specials">
<img src="pc_photo7.png" alt="" />
<h1>Red Rose Select</h1>
<p>A classic collection of 18 signature chocolates served with a romantic red rose for the special person in your life. One of our most popular box sets.</p>
<p>$24.95</p>
<p>Order Now</p>
</div>
<div class="col-1-3 specials">
<img src="pc_photo8.png" alt="" />
<h1>Your Choice</h1>
<p>Build your own collection of signature truffles and chocolates. Now you can choose old favorites from our 24-year history of award-winning chocolates and sweets.</p>
<p>$32.55</p>
<p>Order Now</p>
</div>
<div class="col-1-3 specials">
<img src="pc_photo9.png" alt="" />
<h1>Praline Signatures</h1>
<p>Delicious chocolate with delicious pralines presented in a beautiful and elegant box. Enjoy this fantastic collection inspired by the best Parisian chocolate shops.</p>
<p>$39.23</p>
<p>Order Now</p>
</div>
</div>
</div>
<div class="col-1-3" id="awardList">
<h1>Awards</h1>
<div class="awards" id="award1">
<img src="pc_award1.png" alt="" />
<p>Best of Show</p>
<p>Confectioners Association</p>
</div>
<div class="awards" id="award2">
<img src="pc_award2.png" alt="" />
<p>Five Stars</p>
<p>Confectioner Quarterly</p>
</div>
<div class="awards" id="award3">
<img src="pc_award3.png" alt="" />
<p>Best Chocolate</p>
<p>Food World</p>
</div>
<div class="awards" id="award4">
<img src="pc_award4.png" alt="" />
<p>Best Chocolate</p>
<p>Choco-Fest</p>
</div>
<div class="awards" id="award5">
<img src="pc_award4.png" alt="" />
<p>Best Dessert</p>
<p>Choco-Fest</p>
</div>
</div>
</div>
<footer>
Pandaisia Chocolates © 2017 All Rights Reserved
</footer>
CSS
body {
margin-left: auto;
margin-right: auto;
max-width: 960px;
min-width: 640px;
width: 95%;
}
/* Image Styles */
body img {
display: block;
width: 100%;
}
/* Horizontal Navigation Styles */
body>header>nav.horizontal li {
width: 16.66%;
}
nav.horizontal li {
display: block;
float: left;
}
nav a {
display: block;
}
/* Row Styles */
div.newRow {
clear: both;
width: 100%;
}
div.newRow:after {
clear: left;
content: "";
display: table;
}
/* Column Styles */
div[class^="col-"] {
float: left;
padding: 2%;
}
div.col-1-1 {
width: 100%;
}
div.col-1-2 {
width: 50%;
}
div.col-1-3 {
width: 33.33%;
}
div.col-2-3 {
width: 67.67%;
}
div.col-1-4 {
width: 25%;
}
div.col-3-4 {
width: 75%;
}
div[class^="col-"]:after {
clear: left;
content: "";
display: table;
}
/* Specials Styles */
div {
min-height: 400px;
outline: 1px dashed rgb(71, 52, 29);
}
/* Award Styles */
div#awardList {
position: relative;
height: 650px;
overflow: auto;
}
div.awards>div#award1 {
top: 80px;
left: 5%;
}
div.awards>div#award2 {
top: 280px;
left: 60%;
}
div.awards>div#award3 {
top: 400px;
left: 20%;
}
div.awards>div#award4 {
top: 630px;
left: 45%;
}
div.awards>div#award5 {
top: 750px;
left: 5%;
}
/* Footer Styles */
body>footer {
clear: both;
}

You have used wrong width value for the .col-2-3 i.e width: 67.67%...
....as col-1-3 has width: 33.33% and col-2-3 has width: 67.67%..it means the whole width will be 33.33%+67.67%=101%...which should be is 100%...
It should be width: 66.67%...Also apply box-sizing:border-box
div.col-2-3 {
width: 66.67%;
}
Fiddle Link

Related

How do I get my unordered bulleted list to line up straight?

I have attached my HTML and CSS below, along with a screenshot of the webpage. The bulleted list is not formatting correctly. I want them to form a straight line in the middle with the bullets right beside the words and evenly lined up in the center. Also, my header and footer, both red, look so much wider than the rest of the webpage; how would I fix this?
/*
Landon Byrd
Fall 2021
Plain Red #f60d41
Rich Red #f6130d
Orioles Orange #f64d0d
Sunset Orange #f6870d
Golden Yellow #f6c10d
*/
/* Global settings */
h1 {
text-align: center;
font-family: Papyrus
}
h2 {
text-align: center;
color: #f6130d;
text-decoration: underline
}
.wrapper {
width: 85%;
margin: 0 auto;
max-width: 960px;
}
/* Nav Section */
.nav {
width: 85%;
margin: 0 auto;
background-color: #f6130d;
text-align: center;
}
.menu {
float: left;
width: 25%
}
/* Main section */
.banner {
justify-content: center;
background-color: #f6c10d;
text-align: center;
}
.bulletPoints {
text-align: center;
}
section {
background-color: #f6870d;
color: #f60d41;
font-style: italic;
margin: 25px 50px 75px;
}
body {
background-image: url("images/background.jpeg");
}
.image1 {
display: block;
margin-left: auto;
margin-right: auto;
}
figcaption {
text-align: center;
}
.row {
display: flex;
}
.column {
flex: 33.33%;
padding: 5px;
}
/* Footer section */
* {
box-sizing: border-box;
}
.footer {
text-align: center;
background-color: #f6130d;
color: #f6c10d;
}
.box {
float: left;
width: 33.33%
}
.footer::after {
content: "";
clear: both;
}
/* Copyright section */
.copyright {
text-align: center;
background-color: #f6130d;
color: #f6c10d;
}
<nav class="nav">
<div class="menu">
<p>Home</p>
</div>
<div class="menu">
<p>Shop</p>
</div>
<div class="menu">
<p>Events</p>
</div>
<div class="menu">
<p>Contact Us</p>
</div>
<br/>
<br/>
</nav>
<main class="wrapper">
<div class="banner">
<h1><span class="name">Augie's Custom T-shirts</span></h1>
<h2>Custom T-shirts for you or your party.</h2>
<div class="bulletPoints">
<ul>
<li>Birthday parties</li>
<li>Vacation groups</li>
<li>Bachelorette Parties</li>
<li>Family reunions</li>
<li>Work team rewards</li>
<li>Business promotions</li>
</ul>
</div>
<br/>
</div>
<p id="Catch">
Do you have an event coming up, and want everyone to get in the spirit? T-shirts can bring a group together, make everyone feel connected, and let everyone know what you're celebrating.
</p>
<p>T-shirts can also be a great gift to someone that acknowledges their special interest or hobby.</p>
<p>Choose from one of our unique designs, or let us put your own design on a shirt for you.</p>
<div class="row">
<div class="column">
<img src="images/gorilla.jpg" alt="Gorilla" style="width:100%">
</div>
<div class="column">
<img src="images/pink.jpg" alt="Pink" style="width:100%">
</div>
<div class="column">
<img src="images/skull.jpg" alt="Skull" style="width:100%">
</div>
</div>
<p><strong>How it works:</strong></p>
<p>Browse our selection of unique designs, select the size and colors of the shirts you would like, and place your order. We will ship your shirts within three business days for in-stock shirts, or five days for custom size and colors.</p>
<figure>
<img src="images/t-shirt-colors.jpeg" alt="T-shirt colors" class="image1">
<figcaption>Choose from are variety of t-shirt colors!</figcaption>
</figure>
<p>Have a design of your own? Can't find the right sentiment? Call or email us to discuss the possibilities or get some ideas for your event.</p>
<p>Please note there will be a one time $15 charge for any custom graphics design.</p>
<h2><em>Contact us today!</em></h2>
</main>
<footer class="footer">
<div class="box">
<p>Augie's Custom T-shirts</p>
<p>(478) 555-1212</p>
<p>augieB#augiesTees.com</p>
<br/>
</div>
<div class="box">
<p>Check out are Social Media for updates!</p>
<p>Facebook:</p>
<p>Instagram:</p>
<p>Twitter:</p>
</div>
<div class="box">
<p>Locations:</p>
<br/>
<p>100 Tanger Dr, Locust Grove, GA</p>
<p>2954 Watson Blvd Suite 100, Warner Robins, GA</p>
</div>
</footer>
<div class="copyright">
<h3> #copyright: Landon Byrd</h3>
<p>Fall 2021, All Rights Reserved</p>
</div>
<p>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" />
</a>
</p>
Just add:
.bulletPoints ul {
display:inline-block;
text-align:left;
}
This way the list width would same as the longest line, and it will be aligned to the center as you already gave the property to the container. Just need to align the list to the left (as to overwrite the center alignment inherited from parent.)
/*
Landon Byrd
Fall 2021
Plain Red #f60d41
Rich Red #f6130d
Orioles Orange #f64d0d
Sunset Orange #f6870d
Golden Yellow #f6c10d
*/
/* Global settings */
h1 {
text-align: center;
font-family: Papyrus
}
h2 {
text-align: center;
color: #f6130d;
text-decoration: underline
}
.wrapper {
width: 85%;
margin: 0 auto;
max-width: 960px;
}
/* Nav Section */
.nav {
width: 85%;
margin: 0 auto;
background-color: #f6130d;
text-align: center;
}
.menu {
float: left;
width: 25%
}
/* Main section */
.banner {
justify-content: center;
background-color: #f6c10d;
text-align: center;
}
.bulletPoints {
text-align: center;
}
section {
background-color: #f6870d;
color: #f60d41;
font-style: italic;
margin: 25px 50px 75px;
}
body {
background-image: url("images/background.jpeg");
}
.image1 {
display: block;
margin-left: auto;
margin-right: auto;
}
figcaption {
text-align: center;
}
.row {
display: flex;
}
.column {
flex: 33.33%;
padding: 5px;
}
/* Footer section */
* {
box-sizing: border-box;
}
.footer {
text-align: center;
background-color: #f6130d;
color: #f6c10d;
}
.box {
float: left;
width: 33.33%
}
.footer::after {
content: "";
clear: both;
}
/* Copyright section */
.copyright {
text-align: center;
background-color: #f6130d;
color: #f6c10d;
}
.bulletPoints ul {
display:inline-block;
text-align:left;
}
<nav class="nav">
<div class="menu">
<p>Home</p>
</div>
<div class="menu">
<p>Shop</p>
</div>
<div class="menu">
<p>Events</p>
</div>
<div class="menu">
<p>Contact Us</p>
</div>
<br/>
<br/>
</nav>
<main class="wrapper">
<div class="banner">
<h1><span class="name">Augie's Custom T-shirts</span></h1>
<h2>Custom T-shirts for you or your party.</h2>
<div class="bulletPoints">
<ul>
<li>Birthday parties</li>
<li>Vacation groups</li>
<li>Bachelorette Parties</li>
<li>Family reunions</li>
<li>Work team rewards</li>
<li>Business promotions</li>
</ul>
</div>
<br/>
</div>
<p id="Catch">
Do you have an event coming up, and want everyone to get in the spirit? T-shirts can bring a group together, make everyone feel connected, and let everyone know what you're celebrating.
</p>
<p>T-shirts can also be a great gift to someone that acknowledges their special interest or hobby.</p>
<p>Choose from one of our unique designs, or let us put your own design on a shirt for you.</p>
<div class="row">
<div class="column">
<img src="images/gorilla.jpg" alt="Gorilla" style="width:100%">
</div>
<div class="column">
<img src="images/pink.jpg" alt="Pink" style="width:100%">
</div>
<div class="column">
<img src="images/skull.jpg" alt="Skull" style="width:100%">
</div>
</div>
<p><strong>How it works:</strong></p>
<p>Browse our selection of unique designs, select the size and colors of the shirts you would like, and place your order. We will ship your shirts within three business days for in-stock shirts, or five days for custom size and colors.</p>
<figure>
<img src="images/t-shirt-colors.jpeg" alt="T-shirt colors" class="image1">
<figcaption>Choose from are variety of t-shirt colors!</figcaption>
</figure>
<p>Have a design of your own? Can't find the right sentiment? Call or email us to discuss the possibilities or get some ideas for your event.</p>
<p>Please note there will be a one time $15 charge for any custom graphics design.</p>
<h2><em>Contact us today!</em></h2>
</main>
<footer class="footer">
<div class="box">
<p>Augie's Custom T-shirts</p>
<p>(478) 555-1212</p>
<p>augieB#augiesTees.com</p>
<br/>
</div>
<div class="box">
<p>Check out are Social Media for updates!</p>
<p>Facebook:</p>
<p>Instagram:</p>
<p>Twitter:</p>
</div>
<div class="box">
<p>Locations:</p>
<br/>
<p>100 Tanger Dr, Locust Grove, GA</p>
<p>2954 Watson Blvd Suite 100, Warner Robins, GA</p>
</div>
</footer>
<div class="copyright">
<h3> #copyright: Landon Byrd</h3>
<p>Fall 2021, All Rights Reserved</p>
</div>
<p>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" />
</a>
</p>
That's how lists work in a centered element, I'm afraid. However, there is a solution!
The problem is that you have a div that spans the whole width of the page, within which you've asked for the text to be centered. And your browser has done exactly what you asked for. However, the rule for where the bullets are positioned is that they go to the left of the entire text line. So, when the line is centered, they are off to the left, as you see. (Basically, the text-align applies to the text but not to the bullets, which are technically outside the text itself.)
The solution is to remove the text-align: center and instead to position your bulletPoints div so that this container is centered while the list inside remains left-aligned. You could, for example, do something like this, although you'll need to fiddle with the width to make it suit the layout you want:
.bulletPoints {
width: 50%;
margin: 0 auto;
}
The result will be a list that has the text and bullets properly aligned, but that is centered in the view. This is achieved by the margin property: by setting the left and right margins to auto, you are telling the browser so make them the same, and the only way to do this on an element that's narrower than the available space is to center it.
However, this way of doing things does mean you need to be careful about the responsiveness of your design, and ensure that things display properly on very wide and very narrow windows. For example, on a phone, you won't want to set the width to 50%. So media-query will be your friend!
(Your problem with the red blocks is that you've written the code in a way that produces a result you don't like. To solve it, we need a clearer idea of what you actually want - probably best in a separate question because it's a completely different thing to the list. In general, though, you could wrap the page in a container div that you can set to a max width, which will stop these becoming very wide (or just wrap the content of the header and footer in a container, so the red is full width but the text is constrained). But we'll need a clearer idea of what you want to give a better solution, as I say!)

Why is there a gap in color at the bottom of my webpage?

I have attached my HTML along with my CSS code and a picture of the webpage. I can not figure out why there is a gap in the red background color at the bottom. Any help is much appreciated
/*
Landon Byrd
Fall 2021
Plain Red #f60d41
Rich Red #f6130d
Orioles Orange #f64d0d
Sunset Orange #f6870d
Golden Yellow #f6c10d
*/
/* Global settings */
h1 {
text-align: center;
font-family: Papyrus
}
h2 {
text-align: center;
color: #f6130d;
text-decoration: underline
}
.wrapper {
width: 85%;
margin: 0 auto;
max-width: 960px;
}
/* Nav Section */
.nav {
width: 85%;
margin: 0 auto;
background-color: #f6130d;
text-align: center;
}
.menu {
float: left;
width: 25%
}
/* Main section */
.banner {
justify-content: center;
background-color: #f6c10d;
text-align: center;
}
.bulletPoints {
text-align: center;
}
section {
background-color: #f6870d;
color: #f60d41;
font-style: italic;
margin: 25px 50px 75px;
}
body {
background-image: url("images/background.jpeg");
}
.image1 {
display: block;
margin-left: auto;
margin-right: auto;
}
figcaption {
text-align: center;
}
.row {
display: flex;
}
.column {
flex: 33.33%;
padding: 5px;
}
/* Footer section */
* {
box-sizing: border-box;
}
.footer {
text-align: center;
background-color: #f6130d;
color: #f6c10d;
}
.box {
float: left;
width: 33.33%
}
.footer::after {
content: "";
clear: both;
display: table;
}
/* Copyright section */
.copyright {
text-align: center;
background-color: #f6130d;
color: #f6c10d;
}
<!DOCTYPE html>
<head>
<title>Augie's Custom T-shirts</title>
<meta charset="utf-8">
<link href="Style.css" rel="stylesheet">
</head>
<body>
<nav class="nav">
<div class="menu">
<p>Home</p>
</div>
<div class="menu">
<p>Shop</p>
</div>
<div class="menu">
<p>Events</p>
</div>
<div class="menu">
<p>Contact Us</p>
</div>
<br/>
<br/>
</nav>
<main class="wrapper">
<div class="banner">
<h1><span class="name">Augie's Custom T-shirts</span></h1>
<h2>Custom T-shirts for you or your party.</h2>
<div class="bulletPoints">
<ul>
<li>Birthday parties</li>
<li>Vacation groups</li>
<li>Bachelorette Parties</li>
<li>Family reunions</li>
<li>Work team rewards</li>
<li>Business promotions</li>
</ul>
</div>
<br/>
</div>
<p id="Catch">
Do you have an event coming up, and want everyone to get in the spirit? T-shirts can bring a group together, make everyone feel connected, and let everyone know what you're celebrating.
</p>
<p>T-shirts can also be a great gift to someone that acknowledges their special interest or hobby.</p>
<p>Choose from one of our unique designs, or let us put your own design on a shirt for you.</p>
<div class="row">
<div class="column">
<img src="images/gorilla.jpg" alt="Gorilla" style="width:100%">
</div>
<div class="column">
<img src="images/pink.jpg" alt="Pink" style="width:100%">
</div>
<div class="column">
<img src="images/skull.jpg" alt="Skull" style="width:100%">
</div>
</div>
<p><strong>How it works:</strong></p>
<p>Browse our selection of unique designs, select the size and colors of the shirts you would like, and place your order. We will ship your shirts within three business days for in-stock shirts, or five days for custom size and colors.</p>
<figure>
<img src="images/t-shirt-colors.jpeg" alt="T-shirt colors" class="image1">
<figcaption>Choose from are variety of t-shirt colors!</figcaption>
</figure>
<p>Have a design of your own? Can't find the right sentiment? Call or email us to discuss the possibilities or get some ideas for your event.</p>
<p>Please note there will be a one time $15 charge for any custom graphics design.</p>
<h2><em>Contact us today!</em></h2>
</main>
<footer class="footer">
<div class="box">
<p>Augie's Custom T-shirts</p>
<p>(478) 555-1212</p>
<p>augieB#augiesTees.com</p>
<br/>
</div>
<div class="box">
<p>Check out are Social Media for updates!</p>
<p>Facebook:</p>
<p>Instagram:</p>
<p>Twitter:</p>
</div>
<div class="box">
<p>Locations:</p>
<br/>
<p>100 Tanger Dr, Locust Grove, GA</p>
<p>2954 Watson Blvd Suite 100, Warner Robins, GA</p>
</div>
</footer>
<div class="copyright">
<h3> #copyright: Landon Byrd</h3>
<p>Fall 2021, All Rights Reserved</p>
</div>
<p>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" />
</a>
</p>
</div>
</body>
Side note my verified CSS checker image is also not showing up at the very bottom of the page and the HTML checker is giving me the following error
Error: Stray end tag div.
From line 123, column 1; to line 123, column 6
just add h3{ margin-top: 0px; } to your css code to remove the white line between the red divs at the bottom of the side
add the div with 'class=copyright' inside the footer and remove the extra </div> at last
that h3 tag in your .copyright div taking the default
margin-block-start: 1em;
margin-block-end: 1em;
you can use
.copyright h3{
margin-block:0;
}
this will remove the white space..
or you can use
*{
margin:0;
padding:0;
}
this will remove the default margin and padding from the page

How do I remove page 2 of this page when printing?

I've been trying a few different things to remove the second page on this page when printing. Is there something I am doing wrong?
I've placed:
page-break-after: avoid;
page-break-inside: avoid;
On to the last element on the page, so I'm just a little confused on what I'm doing wrong here.
Any suggestions would be appericated.
See the code below...
/* Custom Hero Styles */
.subhero1 {
background: #000;
height: 400px !important;
}
#media only screen and (min-width: 0px) and (max-width: 650px) {
.subhero1 {
background: #000;
height: 250px !important;
}
.subhero__content-container {
color: #fff !important;
}
}
/* Custom Cards */
.obs__fullcardheader {
border-bottom: 0px;
margin-bottom: 0px;
padding-bottom: 0px;
font-size: 3.5vmax;
}
.obs__fullcard {
height: 400px;
width: 100%;
border: 5px solid #eee;
}
.obs__cardheader img {
max-width: 20%;
}
.obs__card {
height: 300px;
}
.fullcardwrapper {
background: #f6f6f6;
background-size: cover;
background-position: center;
padding-top: 30px;
line-height: 30px;
}
.cardwrapper {
padding: 30px;
}
.appicons img {
max-width: 160px;
}
.small__font {
font-size: 12px;
}
.obs__cardline2 {
font-size: 14px;
}
.obs__cardline1 a {
color: #000;
text-decoration: none;
cursor: pointer;
}
.obs__cardline1 a:hover {
color: #565656;
border-bottom: 1px solid #565656;
}
.obs__cardline2 a {
color: #000;
text-decoration: none;
cursor: pointer;
}
.obs__cardline2 a:hover {
color: #565656;
border-bottom: 1px solid #565656;
}
.coupon-btn-wrapper {
margin: 0 auto;
max-width: 300px;
}
.print-exclusions {
display: none;
}
#media (max-width: 650px) {
.obs__card {
width: 100%;
}
.obs__cardheader img {
max-width: 15% !important;
}
.obs__fullcardheader {
font-size: 4.5vmax;
}
.obs__couponhero-line1 {
padding-top: 20px;
}
}
#media (max-width: 1050px) {
.obs__card {
width: 100%;
height: 250px;
}
.obs__cardheader img {
max-width: 10%;
}
.cardwrapper {
padding: 0px;
margin-top: 0px;
}
.fullcardwrapper {
padding-top: 10px;
background: #fff;
}
.obs__fullcard {
border: 1px solid #eee;
}
.obs__fullcardheader {
font-size: 4.5vmax;
}
.coupon-btn-wrapper {
max-width: 280px;
}
}
.obs__couponhero-line1 {
font-size: 14px;
color: #000;
margin-bottom: 10px;
line-height: 18px;
padding-top: 30px;
}
.obs__couponhero-line2 {
font-size: 14px;
color: #000;
margin-bottom: 10px;
}
.obs__couponhero-barcode {
margin: 0 auto;
}
.obs__couponhero-line3 {
font-size: 14px;
color: #000;
margin-bottom: 10px;
margin-top: -30px;
}
.couponlinks a {
color: #fff;
background: #000;
text-decoration: none;
font-size: 14px;
padding: 15px;
}
#media print {
#page {
size: landscape
}
.obs__card {
width: 33%;
height: 250px;
}
.head-main,
.obs__cardline2,
.appicons,
.cust_service_headline,
.obs__accordion,
.coupon-btn-wrapper {
display: none;
}
.obs__fullcard {
height: 260px;
}
.cardwrapper {
margin-top: 10px;
max-width: 97.8%;
}
.obs__cardheader img {
max-width: 25%;
}
footer {
display: none;
}
.print-exclusions {
display: block;
padding-left: 14px;
margin-top: -115px;
margin-bottom: 0;
page-break-after: avoid;
page-break-inside: avoid;
}
.obs__fullcard {
width: 110%;
}
.obs-3 {
clear: none;
}
#page {
margin: 0;
}
body {
margin: 1.6cm;
}
}
<link href="https://media.offbroadwayshoes.com/css/obframe.css" rel="stylesheet"/>
<div class="frame fullcardwrapper">
<div class="obs__max1200">
<div class="obs__cards">
<div class="obs__fullcard">
<div class="obs__cardinner">
<div class="obs__fullcardheader">##offer##</div>
<div class="obs__couponhero-line1"><span class="new-line-mob">PLUS, BUY ONE, GET ONE</span> <span class="new-line-mob">50% OFF* YOUR 2ND PAIR</span>
<br /> *EXCLUSIONS APPLY</div>
<div class="obs__couponhero-line2">##tatic## · VALID THRU ##valid##</div>
<div class="obs__couponhero-barcode"> </div>
<div class="obs__couponhero-line3">##ifonline## <font style="font-weight:bold;">##onlinecode##</font></div>
<div class="obs__cardline3">
<div class="coupon-btn-wrapper">
<div class="obs-2-static couponlinks" style="text-align: center;">FIND YOUR STORE</div>
<div class="obs-2-static couponlinks" style="text-align: center;">PRINT COUPON</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="frame cardwrapper bg-split__greytowhite">
<div class="obs__max1440">
<div class="obs__cards">
<div class="obs__card">
<div class="obs__cardinner">
<div class="obs__cardheader"><img src="https://media.offbroadwayshoes.com/icons/bogo.svg" alt="" />
<br /> BOGO 50% OFF*</div>
<div class="obs__cardline1">Buy One, Get One 50%
<br /> Off Your 2ND Pair</div>
<div class="obs__cardline2"><a data-exctarget="#1">SEE DETAILS</a></div>
</div>
</div>
<div class="obs__card">
<div class="obs__cardinner">
<div class="obs__cardheader"><img src="https://media.offbroadwayshoes.com/icons/free-shipping.svg" alt="" />
<br /> FREE SHIPPING</div>
<div class="obs__cardline1">Get Free Shipping
<br /> on Orders $50 or More!</div>
<div class="obs__cardline2"><a data-exctarget="#2">SEE DETAILS</a></div>
</div>
</div>
<div class="obs__card">
<div class="obs__cardinner">
<div class="obs__cardheader"><img src="//media.offbroadwayshoes.com/icons/mobile-app.svg" alt="" />
<br /> DOWNLOAD THE APP</div>
<div class="obs__cardline1">Shopping at your finger tips! <a>Learn More</a>
<br />
<br />
</div>
</div>
</div>
</div>
</div>
</div>
<div class="frame">
<div class="obs__max1440">
<div class="obs__spacer50 obs__mob-spacer20"> </div> <span class="cust_service_headline rightsideheading">Details & Exclusions</span>
<div class="obs__spacer10"> </div>
<div class="obs__accordion js-obs__accordion">
<div class="obs__accordion__item js-obs__accordion-item">
<div class="obs__accordion-header js-obs__accordion-header">Coupon Exclusions</div>
<div class="obs__accordion-body js-obs__accordion-body">
<div class="obs__accordion-body__contents">*Limit one coupon per transaction. COUPON MAY ONLY BE USED ONCE AND MAY NOT BE MODIFIED, COPIED OR UPLOADED. Excludes Flash Sales, special promotional events. Must present coupon at time of purchase, cannot be combined with other coupons or used for the purchase of Gift Card(s) and is not redeemable for cash. Offer excluded on certain styles and brands, including but not limited to: Adidas, Asics, Bear Paw, Birkenstock, Converse, Keds, Merrell, Puma, Rainbow, Reebok, Rockport, Saucony, Sperry, Teva, Koolaburra by Ugg, Tommy Hilfiger Kids’, online Timberland & Timberland Pro, plus all Nike styles. Discount is taken before taxes. CAN BE COMBINED WITH EARNED QUALIFYING REWARDS DOLLARS BUT NOT OTHER REWARDS COUPON OFFERS. See store associate for details.</div>
</div>
</div>
<!-- end of obs__accordion item -->
<div class="obs__accordion__item js-obs__accordion-item">
<div class="obs__accordion-header js-obs__accordion-header" id="1">BOGO 50% OFF 2ND PAIR</div>
<div class="obs__accordion-body js-obs__accordion-body">
<div class="obs__accordion-body__contents">*2nd pair must be of equal or lesser value. Excludes BOGO Free styles, Flash Sales, special promotional events, accessories and certain other styles, including but not limited to adidas, Asics, Bear Paw, Birkenstock, Converse, Keds, Koolaburra by Ugg, Merrell, Puma, Rainbow, Reebok, Rockport, Saucony, Sperry, Teva, Tommy Hilfiger Kids’, online Timberland & Timberland Pro, plus all Nike styles.</div>
</div>
</div>
<!-- end of obs__accordion item -->
<div class="obs__accordion__item js-obs__accordion-item">
<div class="obs__accordion-header js-obs__accordion-header" id="2">Free Shipping</div>
<div class="obs__accordion-body js-obs__accordion-body">
<div class="obs__accordion-body__contents">Free economy shipping offer valid on orders with a subtotal over $50 after all discounts are applied. (Subtotal does not include tax or shipping fees)</div>
</div>
</div>
<!-- end of obs__accordion item -->
</div>
<!-- end of obs__accordion item -->
<!-- end of obs__accordion -->
</div>
</div>
<div class="obs__spacer50 obs__mob-spacer20"> </div>
<div class="print-exclusions">
<div class="obs-3">
<p class="obs__bold">COUPON EXCLUSIONS
<p>
<p style="font-size:8px;">*Limit one coupon per transaction. COUPON MAY ONLY BE USED ONCE AND MAY NOT BE MODIFIED, COPIED OR UPLOADED. Excludes Flash Sales, special promotional events. Must present coupon at time of purchase, cannot be combined with other coupons or used for the purchase of Gift Card(s) and is not redeemable for cash. Offer excluded on certain styles and brands, including but not limited to: Adidas, Asics, Bear Paw, Birkenstock, Converse, Keds, Merrell, Puma, Rainbow, Reebok, Rockport, Saucony, Sperry, Teva, Koolaburra by Ugg, Tommy Hilfiger Kids’, online Timberland & Timberland Pro, plus all Nike styles. Discount is taken before taxes. CAN BE COMBINED WITH EARNED QUALIFYING REWARDS DOLLARS BUT NOT OTHER REWARDS COUPON OFFERS. See store associate for details.</p>
</div>
<div class="obs-3">
<p class="obs__bold">BOGO 50% OFF 2ND PAIR
<p>
<p style="font-size:8px;">*2nd pair must be of equal or lesser value. Excludes BOGO Free styles, Flash Sales, special promotional events, accessories and certain other styles, including but not limited to adidas, Asics, Bear Paw, Birkenstock, Converse, Keds, Koolaburra by Ugg, Merrell, Puma, Rainbow, Reebok, Rockport, Saucony, Sperry, Teva, Tommy Hilfiger Kids’, online Timberland & Timberland Pro, plus all Nike styles.</p>
</div>
<div class="obs-3">
<p class="obs__bold">FREE SHIPPING
<p>
<p style="font-size:8px;">Free economy shipping offer valid on orders with a subtotal over $50 after all discounts are applied. (Subtotal does not include tax or shipping fees)</p>
</div>
</div>

Wanting all Images to have the same height in a container

I'm trying to have all images in my flex container have the same height using a 4:3 ratio, all of this being responsive.
When out of the flex container everything works well, but when put in it, it seems like it's the length of the title that dictates the width. I can't figure out why.
https://jsfiddle.net/ts8Lwp6g/
/* Just copying the guy in vid for now, trying to figure it all out hopefully it won't be too much of a bother responsive eh ffs , somethings I haven't copied, tryna do best */
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
background-color: gray;
width: 80%;
margin: auto;
}
#cccccc {
background-color: orange;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.w {
background-color: red;
/* doesnt show hay */
display: block;
}
.views {
float: left
}
.rating {
float: right
}
.parentt {
max-width: 258px;
}
.containertt {
width: 100%;
position: relative;
padding-bottom: 75%;
/* 34.37% = 100 / (w / h) = 100 / (640 / 220) */
}
.containertt img {
width: 100%;
height: 100%;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.figcaptionnnn {
/* background-color:red; */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%
}
.figcaptionnnn a {
color: white;
text-decoration: none;
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="tete.css">
</head>
<body>
<div id="cccccc">
<div class="parentt">
<div class="containertt">
<img height="145" width="258" src="https://s3-us-west-2.amazonaws.com/i.cdpn.io/221971.RajoRb.7fb2f73a-0b7d-4aa3-ac25-f0f31261cdae.png" />
</div>
<div class="figcaptionnnn">
<span class="titlee"><a href=https://pornhub.com/view_video.php?viewkey=1306454068 title="Tall french maid and batman" >Tall french maid and batman</a></span></br>
<div class="w"><span class="views"> 692818 views</span><span class="rating">75 %</span></div>
</div>
</div>
<div class="parentt">
<div class="containertt">
<img height="145" width="258" src="https://s3-us-west-2.amazonaws.com/i.cdpn.io/221971.RajoRb.7fb2f73a-0b7d-4aa3-ac25-f0f31261cdae.png" />
</div>
<div class="figcaptionnnn">
<span class="titlee"><a href=https://pornhub.com/view_video.php?viewkey=1306454068 title="Tall french maid and batman" >Tall french maid and batman vdfvdsv dvdfv ddffv dvddv dvdcffc dvdfcd</a></span><br/>
<div class="w"><span class="views"> 692818 views</span><span class="rating">75 %</span></div>
</div>
</div>
</div>
<div class="parentt">
<div class="containertt">
<img height="145" width="258" src="https://s3-us-west-2.amazonaws.com/i.cdpn.io/221971.RajoRb.7fb2f73a-0b7d-4aa3-ac25-f0f31261cdae.png" />
</div>
<div class="figcaptionnnn">
<span class="titlee"><a href=https://pornhub.com/view_video.php?viewkey=1306454068 title="Tall french maid and batan" >Tall french maid and batman</a></span></br>
<div class="w"><span class="views"> 692818 views</span><span class="rating">75 %</span></div>
</div>
</div>
<div class="parentt">
<div class="containertt">
<img height="145" width="258" src="https://s3-us-west-2.amazonaws.com/i.cdpn.io/221971.RajoRb.7fb2f73a-0b7d-4aa3-ac25-f0f31261cdae.png" />
</div>
<div class="figcaptionnnn">
<span class="titlee"><a href=https://pornhub.com/view_video.php?viewkey=1306454068 title="Tall french maid and batman" >Tall french maid and batman vdfvdsv dvdfv ddffv dvddv dvdcffc dvdfcd</a></span></br>
<div class="w"><span class="views"> 692818 views</span><span class="rating">75 %</span></div>
</div>
</div>
</body>
</html>

Social media buttons won't fit in the navigation area

Hey everyone I am having an issue where my social media buttons for my website are not staying in the nav header area. I have tried using the float attribute and it wont stay in the header here are some images to show you what I am talking about.
http://imgur.com/zwmtXju
as you can see in this image the social media buttons wont stay in the header area, any help would be appreciated. Thanks in advance.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/main.js"></script>
</head>
<body>
<div id="container">
<header>
<nav class="clearfix">
<a href="#" id="brand">
<h1>Skull</h1>
</a>
<ul class="clearfix">
<li>Moonshine</li>
<li>Recipes</li>
<li>The Blog</li>
<li>The Store</li>
<div id="socialMedia">
<img src="imgs/fbsm.png" alt=""/>
<img src="imgs/tsm.png" alt=""/>
<img src="imgs/psm.png" alt=""/>
</div>
</ul>
Skull®
</nav>
</header>
<div id="content">
<div id="story">
<p id="ourStory">Our Story</p>
<h1 id="bootleg">Bootlegging</h1>
<p id="storyBoard">
<span class="storyTelling">This is our history,</span>
<span class="storyTelling">our story,</span>
<span class="storyTelling">of how we became one of the greatest</span>
<span class="storyTelling">moonshine brands on the planet.</span>
<span class="storyTelling">A story of struggle,</span>
<span class="storyTelling">and independence,</span>
<span class="storyTelling">accompanied by expert craftmanship.</span>
<span class="storyTelling">Using years as chapters of our book of life</span>
<span class="storyTelling">we will show you what makes our moonshine so great.</span>
<span class="storyTelling">Scroll down and enjoy.</span>
</p>
</div>
<div id="timeLine">
<div id="present">
<h1>Here and Now</h1>
<p>Now in 2014 we are a globally recognized brand that many people know and love. </p>
<img src="imgs/skullBrand.png" alt=""/>
</div>
<div id="2000">
<h1>2000</h1>
<p>In 2000, bars started buying our moonshine to make drinks with. This was a huge milestone for Skull®
Because, it brought our brand to the attention of many people that were not yet customers of our great alcohol. </p>
<img src="imgs/skullBrand.png" alt=""/>
</div>
<div id="1960">
<h1>1960</h1>
<p>By 1960 we were booming with popularity. Skull alcohol became a recognized brand.</p>
<img src="imgs/skullBrand.png" alt=""/>
</div>
<div id="1933">
<h1>1933</h1>
<p>By 1933 Prohibition was repealed, and the market grew thin. But that didn't stop us. Skull alcohol was born.
With our superior craftsmanship skills, and our excellent customer satisfaction our legacy continued</p>
<img src="imgs/prohibitionends.jpg" width="263" height="185" alt=""/>
</div>
<div id="1920">
<h1>1920</h1>
<p>By the early 1900s, states began passing laws that banned alcohol sales, and consumption. in 1920,
nationwide Prohibition went in to effect. It was the greatest thing moonshiners could have asked for.
Because there was no legal alcohol available, the demand for moonshine shot up like a rocket. Moonshiners
had so much business they couldn't even keep up with the demand. Hidden saloons called speakeasies were even
opened in every city. they were used to sell the illegal whisky.</p>
<img src="imgs/dry.jpg" height="200" alt=""/>
</div>
<div id="1860">
<h1>1860</h1>
<p>The hatred from the Whisky Rebellion escalated in to the 1860s as the government continued
to try and collect excise tax to fund the Civil War. At this time Moonshiners and many other anti-governmental
groups, such as the KKK, joined forces to kill anyone who would release the location of their stills and attack IRS officials and
their families.</p>
<img src="imgs/kkk.jpg" width="263" height="185" alt=""/>
</div>
<div id="1794">
<h1>1794</h1>
<p>The American people, who had just fought a war to get out from under oppressive British taxes
(among other things), were not particularly pleased. So, they decided to just keep making their own
whisky, completely ignoring the federal tax. All the resentment that the citizens had toward the
government eventually exploded when several hundred angry citizens took over the city of Pittsburgh,
Pennsylvania. President George Washington called apon the militia, a group of 13,000 troops to disperse
The angry mob. The Whiskey Rebellion was a failure.</p>
<img src="imgs/wr.jpg" alt=""/>
</div>
<div id="1791">
<h1>1791</h1>
<p>Moon shining began very early in American history. Shortly after the Revolution,
the United States found itself struggling to pay for the expense of fighting a long war.
The solution was to place a federal tax on liquors and spirits that would soon be known
as the whisky tax.</p>
<img src="" alt=""/>
</div>
</div>
</div>
<footer>
<div class="footerContent"></div>
<div class="footerContent"></div>
<div class="footerContent"></div>
</footer>
</div><!--containerEnd-->
</body>
</html>
/* Clearfix */
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
body {
width: 1920px;
background-color: #202021;
}
#container{
width: 100%;
margin: 0;
background: url('../imgs/565.jpeg') repeat-y center center fixed ;
}
header{
width: 100%;
height: 100px;
}
nav{
width: 100%;
height: 100px;
position: relative;
border-bottom: 2px solid #cccccc;
}
#brand{
margin-top:15px;
width: 250px;
height: 70px;
float: left;
background: url('../imgs/skullAlcoholText.png') no-repeat;
}
#brand h1{
display: none;
}
nav ul{
padding: 0;
margin: 0 auto;
width: 600px;
height: 100px;
list-style: none;
color: #fff;
border-bottom: 2px solid #cccccc;
}
nav li{
display: inline;
float: left;
}
nav a{
color: #fff;
display:inline-block;
width: 150px;
text-align: center;
text-decoration: none;
line-height: 100px;
}
nav li a{
border-right: 1px solid #cccccc;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
nav li:first-child a{
border-left: 1px solid #cccccc;
}
nav a:hover, nav a:active {
color: #ffffff ;
}
#socialMedia{
width: 320px;
float: right;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
#socialMedia a:first-child{
}
#socialMedia a{
width: 100px;
}
nav a#pull {
display: none;
}
#content {
text-align: center;
}
#story{
margin: auto;
line-height: 2;
width: 300px;
height: 200px;
}
#ourStory, #bootleg, #storyBoard{
text-align: center;
color: #ffffff;
}
Your nav ul width is 600px. It's too small to contain all these elements. Therefore div is on next row. I also prefer to change div on something more semantic, like ul.
Put your code in table
<table width="646" border="0">
<tr><td width="98"><ul class="clearfix"><li>Moonshine</li></td><td width="82"><li>Recipes</li></td><td width="88"><li>The Blog</li></td><td width="110"><li>The Store</li></td>``<td width="78"><div id="socialMedia"><img src="imgs/fbsm.png" alt=""/></div></td><td width="78"><div id="socialMedia"><img src="imgs/tsm.png" alt=""/></div></td><td width="82"><div id="socialMedia"><img src="imgs/psm.png" alt=""/></div></td></tr></table></ul>