css how to make vertical timeline with dot between two points - css

I would like to know the technique how to make vertical timeline with dot between two point as like as the picture.
Any sample code.
Regards.

Use background-image: radial-gradient create dotes and use "pseudo-element" add dotes and icon.
* {
box-sizing: border-box;
}
.items {
margin: 0;
padding: 0;
list-style: none;
}
.items li {
position: relative;
padding: 0 10px 20px 40px;
}
.items li:after {
content: "";
position: absolute;
background: #02a4ce;
width: 16px;
height: 16px;
left: 6px;
top: 2px;
border-radius: 50%;
}
.items li:before {
content: "";
position: absolute;
height: 100%;
width: 20px;
left: 8px;
top: 0;
background-image: radial-gradient(circle at 2.5px, #ccc 1.25px, rgba(255, 255, 255, 0) 2.5px);
background-position: top, right, bottom, left;
background-size: 15px 15px;
background-repeat: repeat-y;
}
.items .end:before {
display: none;
}
.items .end:after {
background: #ec6352;
}
<ul class="items">
<li>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</li>
<li>
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</li>
<li class="end">
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</li>
</ul>

Related

Change navbar bootstrap

I'm using bootstrap to build my website. I have a typical navbar with menu options, but I need to change the CSS to produce something like the image below (that will continuos work on mobile).
The image represents the expected result.
<nav class="navbar navbar-default navbar-default-light navbar-fixed-top">
<div class="container">
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand page-scroll" href="index.php"><img src="assets/img/img.png" width="152px"></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="hidden">
<!-- menu options -->
</li>
</ul>
</div>
</div>
</nav>
CSS used code: the css of navbar class is the default used in Boostrap.
.navbar-default {
border-color: transparent;
background-color: #1f3741;
padding: 25px 0;
border: 0;
background-color: #ffffff;
-webkit-transition: padding .3s;
-moz-transition: padding .3s;
transition: padding .3s;
}
.navbar-default-light{
background-color: transparent;
}
.navbar-default .navbar-brand {
font-family : Lato,"Helvetica Neue",Helvetica,Arial,cursive;
color: #1676a9;
margin-top:-10px;
}
.navbar-default .navbar-collapse {
border-color: rgba(255,255,255,.02);
padding-top: 15px;
}
.navbar-default .navbar-toggle {
border-color: #1676a9;
background-color: #1676a9;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
}
.navbar-default .nav li a {
font-size: 16px;
font-family: "Raleway", "Helvetica", sans-serif;
text-transform: uppercase;
line-height: 1.2;
padding: 15px 10px;
color: rgb(0, 0, 0);
}
.navbar-default-light .navbar-collapse {
margin-top: 20px;
}
.navbar-default-light .nav li a {
color: rgb(255, 255, 255);
}
.navbar-default .navbar-brand {
font-size: 2em;
-webkit-transition: all .3s;
-moz-transition: all .3s;
transition: all .3s;
}
Anyone can help me?
Here is some overlapping style on bootstrap classes to design for second image.I hope this below snipped will help you lot.
#import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css');
.navbar-default-light{
border-color: transparent;
border: none;
background-color: #c3c3c3;
}
.navbar-default .navbar-brand {
color: #1676a9;
}
.navbar-default .navbar-collapse {
border-color: rgba(255,255,255,.02);
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
z-index: 2;
position: relative;
margin-left: 14px;
height: 3px;
}
.navbar-default-light .nav li{
width: 100%;
display: block;
float: none;
text-align: center;
}
.navbar-default-light .nav li a {
line-height: 1.2;
font-size: 16px;
text-transform: uppercase;
color: #000;
}
.navbar-default-light .navbar-toggle{
display: block;
right: -15px;
margin-right: 0px;
position: absolute;
border-radius: 0;
border: none;
background: #999;
height: 100%;
top: 0;
width: 50px;
outline: none;
text-align: center;
padding-left: 0;
padding-right: 0;
margin-top: 0;
overflow: hidden;
}
.navbar-default-light .navbar-toggle:hover{background: #999; opacity: 0.75}
.navbar-default-light .navbar-toggle:before{
content: '';
position: absolute;
width: 80px;
height: 80px;
top: 10px;
left: -46.5px;
background: #1676a9;
transform: rotate(-45deg);
transform-origin: center;
z-index: 0;
}
.navbar-right {
float: none!important;
margin-right: 0px;
top: 0;
width: 100%;
}
.collapse.in, .collapsing{
width: 100%!important;
min-width: 100%;
}
.navbar-items{
position: absolute;
height: auto;
background: #ccc;
top: 50px;
left: 0;
overflow: hidden;
overflow-y: auto;
max-height: 250px;
}
#media(max-width: 767.98px){
.navbar-default-light .navbar-toggle {
right: -30px;
}
}
<nav class="navbar navbar-default navbar-default-light navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header" style="position: relative; width: 100%;">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bscollapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand Name</a>
</div>
<div class="collapse navbar-collapse1 navbar-items" id="bscollapse">
<ul class="nav navbar-nav navbar-right">
<li>Menu #1</li>
<li>Menu #2</li>
<li>Menu #3</li>
<li>Menu #4</li>
<li>Menu #5</li>
<li>Menu #6</li>
<li>Menu #7</li>
<li>Menu #8</li>
<li>Menu #9</li>
<li>Menu #10</li>
<li>Menu #11</li>
<li>Menu #12</li>
<li>Menu #13</li>
<li>Menu #14</li>
<li>Menu Last</li>
</ul>
</div>
</div>
</nav>
<div style="min-height: 100vh; padding-top: 70px;">
<div class="container">
<div class="row">
<div class="col-sm-12">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<p>
Last Line...
</p>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

Can I achieve this border arrow style with just one pseudo-element instead of two? [duplicate]

This question already has answers here:
Make a CSS triangle with transparent background on a div with white bg image?
(5 answers)
Transparent arrow/triangle indented over an image
(4 answers)
How do CSS triangles work?
(23 answers)
Closed 5 years ago.
GitHub uses two pseudoelements to show the green border around the triangle.
Like this:
Can I get the same result with only using one ::after selector?
You can try this
div {
width:300px;
height:100px;
background:#fff;
border:1px solid green;
position:relative;
padding:20px;
}
div:after {
content:"";
position:absolute;
right:-11px;
top:30px;
width:20px;
height:20px;
background:#fff;
border:1px solid green;
border-left:none;
border-bottom:none;
transform:rotate(45deg);
-webkit-transform:rotate(45deg);
user-select:none;
-webkit-user-select: none;
}
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam,quis nostrud exercitation
</div>
You can used :after & :before selector for that
div {
width: 300px;
height: 200px;
background: #fff;
border: 1px solid #1db73f;
position: relative;
padding: 20px;
border-radius:5px;
}
div:before {
content: "";
position: absolute;
right: -20px;
top: 30px;
width: 0;
height: 0;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 20px solid #fff;
z-index:1;
}
div:after {
content: "";
position: absolute;
right: -21px;
top: 30px;
width: 0;
height: 0;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 20px solid #1db73f;
}
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>

The third element wraps to the next line after resizing browser

I worked on the code i had posted here and fixed it so it does the things i wanted to but the third element in the row wraps to the next line when the browser is between 992px and 1350px. when the browser is between 992px and 1350px the third element in he row wraps to the next line, i have tried with display: inline-block, the left, rifght, center, floats, the flexbox and many other things but nothing seems to work with the media queries in the csss
CSS
* {
box-sizing: border-box;
margin: 0;
}
body {
font-family: Times, Verdana, sans-serif;
font-size:100%;
}
}
/**** Row (for the responsive design***/
.row {
padding: 15%;
margin-right: 5px;
margin-left: 5px;
}
/**** Header ****/
header {
font-size: 24px;
margin-bottom: 35px;
padding-top: 2.5%;
text-align: center;
}
/**** Article styles and position ****/
#art1, #art2, #art3 {
display: inline-block;
float: left;
height: 40%;
width: 31%;
}
#art1 {
margin: 10px 20px 10px 25px;
}
#art2 {
margin: 10px 10px 10px 10px;
}
#art3 {
margin: 10px 20px 10px 10px;
}
/**** Article titles ****/
#lorem1 {
background-color: lightgreen;
border: 1.5px solid black;
left: 70%;
margin-bottom: -28.9px;
padding-left: 15px;
padding-right: 15px;
position: relative;
text-align: center;
width: 30%;
}
#lorem2 {
background-color: turquoise;
border: 1.5px solid black;
left: 70%;
top: 20%;
position: relative;
width: 30%;
margin-bottom: -28.9px;
padding-right: 15px;
padding-left: 15px;
text-align: center;
}
#lorem3 {
background-color: crimson;
border: 1.5px solid black;
left: 70%;
margin-bottom: -28.9px;
padding-left: 15px;
padding-right: 15px;
position: relative;
text-align: center;
width: 30%;
}
/**** Content of the articles ****/
p {
border: 1px black solid;
overflow: hidden;
text-overflow: hidden;
}
.p1, .p2, .p3 {
background-color: mediumpurple;
color: gold;
padding: 35px 10px 10px 15px;
}
/**** Media queries ****/
/**Mobile devices**/
#media (max-width: 767px) {
* {
box-sizing: border-box;
margin: 0;
}
#art1, #art2, #art3 {
width: 94.5%;
display: block;
}
#art1, #art2, #art3 {
margin: 10px 20px 10px 20px;
}
}
/**Tablets**/
#media (min-width: 768px) and (max-width: 991px) {
*{
margin: 0; }
#art1, #art2 {
width: 45.5%;
display: inline-block;
}
#art3 {
display: inline-block;
width: 92%;
position: relative;
left: 2.5%;
}
#art1 {
margin: 10px 20px 10px 25px;
}
#art2 {
margin: 10px 10px 10px 10px;
}
#art3 {
margin: 10px 40px 10px 20px;
}
/**Desktop computers**/
#media (min-width: 992px) and (max-width: 1199px) {
* {
box-sizing: border-box;
margin: 0;
}
.row {
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-start;
flex-direction: row;
border: 2px solid red; /* not necesary just checkiing it'd appear on the screen*/
}
#art1, #art2, #art3 {
width: 31%;
height: 30%;
}
#art1 {
margin: 10px 20px 10px 25px;
}
#art2 {
margin: 10px 10px 10px 10px;
}
#art3 {
margin: 10px 20px 20px 10px;
fle
}
}
/**** Deskptops above 1360px ****/
#media (min-width: 1200px) and (max-width: 1350px) {
* {
box-sizing: border-box;
margin: 0;
}
.row {
display:flex;
flex-wrap: wrap;
justify-content: center ; /* for horizontal aligning of child divs */
align-items : center ; /* for vertical aligning */
}
#art1, #art2, #art3 {
width: 31%;
display: inline-block;
}
#art1 {
margin: 10px 20px 10px 25px;
}
#art2 {
margin: 10px 10px 10px 10px;
}
#art3 {
margin: 10px 20px 20px 10px;
}
}
html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/styles-2.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Week 2 assigment</title>
</head>
<body>
<section class="row">
<header>
<h1>Our Menu</h1>
</header>
<article id="art1" >
<h2 id="lorem1">Chiken</h2>
<p class="p1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</article>
<article id="art2" >
<h2 id="lorem2">Beef</h2>
<p class="p2">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</article>
<article id="art3">
<h2 id="lorem3">Sushi</h2>
<p class="p3">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</article>
</section>
</body>
</html>
Your code is not following any general layout. I suggest checking out w3 and looking at float/clearfix or flexbox layouts so you can figure out stuff before posting too much.
here is a simple vanilla way too display three columns in a line. You can add your media queries to make the sections 100% on resize.
Your CSS is excessive and uses bootstrap classes without having it in your head. And your css plays with these classes. I am not sure what's going on here haha. Hope this helps bro!
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */
section {
width:31.33%;
float:left;
margin-right:1%;
}
<body>
<header>
<h1>Our menu</h1>
</header>
<div class="clearfix">
<section class="1">
<h2 class="loremab1">lorem 1</h2>
<p class="p1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</section>
<section class="2">
<h2 class="loremab2">lorem 2</h2>
<p class="p2">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</section>
<section class="3">
<h2 class="loremab3">lorem 3</h2>
<p class="p3">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</section>
</div>
</body>

Responsive Issues - div class="row" and section title

Would greatly appreciate some help with my coding:
`https://jsfiddle.net/1qvejx38/`
It seems like does not work on my coding, which I noticed when examining the Chrome Developer. It does not detect the entire grid, which affects the third section when the browser is reduced to medium device width.
Also, the section titles do not align with the right border of the sections.
Could someone please give me some advice? I've been racking my brains out but I just cannot pinpoint where the fault lies.
By the way, this is an assignment for a course that I am taking at the moment. We are not allowed to use any CSS or JS frameworks.
Thanks very much!
Remove the width: 90%; from p. Also add required padding for p and h2.
/***** Basic Styles *****/
*{
box-sizing: border-box;
}
h1{
font-family: Arial, Helvetica, sans-serif;
font-size: 175%;
font-weight: bold;
text-align: center;
color: #696969;
}
h2 {
font-family: Arial, Helvetica, sans-serif;
text-align: center;
font-size: 125%;
font-weight: bold;
color: #FF8C00;
width: 100px;
padding: 10px;
position: relative;
float: right;
overflow: hidden;
margin: 0 10px 0 0;
}
p {
font-family: Arial, Helvetica, sans-serif;
text-align: left;
color: #4B0082;
margin: 0 10px 10px;
padding: 20px;
padding-top: 65px;
}
section {
float: left;
display: block;
position: relative;
}
.box1a{
border: 1px solid #696969;
/** background-color: **/
}
.box1b{
border: 1px solid #696969;
/** background-color: **/
}
.box1c{
border: 1px solid #696969;
/** background-color: **/
}
.box2a{
border: 1px solid #696969;
/** background-color: **/
}
.box2b{
border: 1px solid #696969;
/** background-color: **/
}
.box2c{
border: 1px solid #696969;
/** background-color: **/
}
/*****Simple Responsive Framework*****/
.row {
width: 100%;
}
/***** For Large Devices *****/
#media (min-width: 992px) {
.col-lg-4 {
float: left;
width: 33.33%;
}
}
/***** For Medium Devices *****/
#media (min-width: 768px) and (max-width: 991px) {
.col-md-6 {
float: left;
width: 50%;
}
.col-md-12 {
width: 100%;
}
.section3 {
width: 100%;
margin-bottom: 25px;
}
}
/***** For Small Devices *****/
#media (max-width: 767px) {
.col-sm-12 {
width: 100%;
}
.section3 {
margin-bottom: 25px;
}
}
<title>Assignment Solution for Module 2</title>
<link rel="stylesheet" href="style.css">
<body>
<h1> Our Menu</h1>
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-12">
<section class="section1">
<h2 class="box1a">Chicken</h2>
<p class="box2a">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</section>
</div>
<div class="col-lg-4 col-md-6 col-sm-12">
<section class="section2">
<h2 class="box1b">Beef</h2>
<p class="box2b">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</section>
</div>
<div class="col-lg-4 col-md-12 col-sm-12">
<section class="section3">
<h2 class="box1c">Seafood</h2>
<p class="box2c">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</section>
<div>
</div>
</body>
</html>
Updated fiddle - https://jsfiddle.net/afelixj/1qvejx38/2/

Layout with CSS does not align properly

Here is what my final layout should look like:
Unfotunately I am having trouble getting the two columns to layout properly with my css coding. When I use the float: left; coding it stacks them on top of each other.
/*------ Document -----*/
body {
margin: 0 auto;
padding: 0;
font: .75em/1.5em Helvetica, Arial, sans-serif;
color: #797267;
width: 960px;
background: #797267;
}
/**--- Headers ---*/
header {
width: 960px;
height: 210px;
background-image: url(../images/header-bg.jpg);
}
h1 {
width: 317px;
height: 71px;
padding: 64px 0px 0px 64px;
margin: 64px 64px 0px 0px;
}
h2 {
color: #423b2e;
size: 1.5em;
}
/*--- Navigation ---*/
nav {
color: #423b2e;
}
#current {
color: #bf3102;
}
ul {
list-style-type: none;
padding: 84px 64px 0px 0px;
float: right;
clear: left;
width: 277px;
}
li {
display: inline;
}
/*--- Banner --*/
div {
background-image: url(../images/main-content-bg.jpg);
width: 960px;
}
div #banner {
background-image: url(../images/banner.jpg);
width: 890px;
height: 200px;
margin: auto;
background-repeat: none;
}
/*--- Two-Columns Content --*/
#column1of2 {
width: 450px;
padding: 25px;
}
#column1of2.page-flip {
background-image: url(../images/page-flip.gif);
background-repeat: no-repeat;
background-position: left bottom;
width: 450px;
margin: 0px 0px 45px 64px;
}
#column2of2 {
width: 260px;
padding: 25px;
}
#column2of2.page-flip {
background-image: url(../images/page-flip.gif);
background-repeat: no-repeat;
background-position: left bottom;
width: 260px;
margin: 0px 0px 45px 44px;
}
/*--- Footer --*/
footer {
background-image: url(../images/footer-bg.jpg);
background-repeat: no-repeat;
color: #423b2e;
size: .9em;
text-align: center;
width: 960px;
padding: 92px 0px 0px 0px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>BusinessName</title>
<link rel="stylesheet" href="css/main.css" />
</head>
<body>
<header>
<h1>BusinessName</h1>
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Services</li>
<li>Contact</li>
</ul>
</nav>
</header>
<div id="main-content">
<div id="banner">
</div>
<section id="column1of2" class="page-flip">
<h2>Who We Are (h2)</h2>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Aenean pretium tellus sit amet enim. Donec laoreet urna ut pede. Nulla eget magna at felis feugiat imperdiet.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</section>
<section id="column2of2" class="page-flip">
<h2>How We Can Help (h2)</h2>
<p><img width="70" height="70" alt="placeholder image" src="images/sample-thumb1.jpg" /> Sunc auctor, est a scelerisque vehicula, tortor nulla imperdiet elit, eu tincidunt ligula. </p>
<p><img width="70" height="70" alt="placeholder image" src="images/sample-thumb2.jpg" /> Sunc auctor, est a scelerisque vehicula, tortor nulla imperdiet elit, eu tincidunt ligula. </p>
<p><img width="70" height="70" alt="placeholder image" src="images/sample-thumb3.jpg" /> Sunc auctor, est a scelerisque vehicula, tortor nulla imperdiet elit, eu tincidunt ligula. </p>
</section>
</div>
<footer>
<p>© BusinessName. All rights reserved. </p>
</footer>
</body>
</html>
I think you made a mistake. float: left; is not applied to either of the columns.
Without looking at your code, did you try to use Display:inline?
I think you want this.I don't have your images.so i set the beckground-color for demo.
body {
margin: 0 auto;
padding: 0;
font: .75em/1.5em Helvetica, Arial, sans-serif;
color: #797267;
width: 960px;
background: #797267;
}
/**--- Headers ---*/
header {
width: 960px;
height: 210px;
background-image: url(../images/header-bg.jpg);
background-color:red;
}
h1 {
width: 317px;
height: 71px;
padding: 64px 0px 0px 64px;
margin: 64px 64px 0px 0px;
}
h2 {
color: #423b2e;
size: 1.5em;
}
/*--- Navigation ---*/
nav {
color: #423b2e;
}
#current {
color: #bf3102;
}
ul {
list-style-type: none;
padding: 84px 64px 0px 0px;
float: right;
clear: left;
width: 277px;
}
li {
display: inline;
}
/*--- Banner --*/
div {
background-image: url(../images/main-content-bg.jpg);
width: 960px;
background-color:black;
}
div #banner {
background-image: url(../images/banner.jpg);
width: 890px;
height: 200px;
margin: auto;
background-repeat: none;
background-color:green;
}
/*--- Two-Columns Content --*/
#column1of2 {
width: 450px;
padding: 25px;
float:left;
background-color:yellow;
}
#column1of2.page-flip {
background-image: url(../images/page-flip.gif);
background-repeat: no-repeat;
background-position: left bottom;
width: 450px;
margin: 0px 0px 45px 64px;
}
#column2of2 {
width: 260px;
padding: 25px;
background-color:blue;
float:left;
}
#column2of2.page-flip {
background-image: url(../images/page-flip.gif);
background-repeat: no-repeat;
background-position: left bottom;
width: 260px;
margin: 0px 0px 45px 44px;
}
/*--- Footer --*/
footer {
background-image: url(../images/footer-bg.jpg);
background-repeat: no-repeat;
color: #423b2e;
size: .9em;
text-align: center;
width: 960px;
padding: 92px 0px 0px 0px;
background-color:green;
clear:both;
}
<header>
<h1>BusinessName</h1>
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Services</li>
<li>Contact</li>
</ul>
</nav>
</header>
<div id="main-content">
<div id="banner">
</div>
<section id="column1of2" class="page-flip">
<h2>Who We Are (h2)</h2>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Aenean pretium tellus sit amet enim. Donec laoreet urna ut pede. Nulla eget magna at felis feugiat imperdiet.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</section>
<section id="column2of2" class="page-flip">
<h2>How We Can Help (h2)</h2>
<p><img width="70" height="70" alt="placeholder image" src="images/sample-thumb1.jpg" /> Sunc auctor, est a scelerisque vehicula, tortor nulla imperdiet elit, eu tincidunt ligula. </p>
<p><img width="70" height="70" alt="placeholder image" src="images/sample-thumb2.jpg" /> Sunc auctor, est a scelerisque vehicula, tortor nulla imperdiet elit, eu tincidunt ligula. </p>
<p><img width="70" height="70" alt="placeholder image" src="images/sample-thumb3.jpg" /> Sunc auctor, est a scelerisque vehicula, tortor nulla imperdiet elit, eu tincidunt ligula. </p>
</section>
</div>
<footer>
<p>© BusinessName. All rights reserved. </p>
</footer>

Resources