/************************
STYLES.CSS
=========================
*/


/* IMPORT RESET
======================
Browsers add their own defaults (margin, padding,
and more), so this will zero those out and give us
a clean slate to work with. This is called a reset
and is a best practice in web design.
*/

@import url("reset.css");


/* IMPORT FONT
======================
This line pulls in a typeface named
Karla from Google Fonts in two weights: 400 (normal) and
700 (bold).
*/

@import url("http://fonts.googleapis.com/css?family=Karla;400,700");

/* TYPOGRAPHY
======================
This sets some general typography rules for things like
the body and headlines.
*/

body {
	font-family: 'Karla', sans-serif;
	line-height: 1.4em;
	color: #333333;
}

/* These apply to all three header sizes. */

h1, h2, h3 {
	margin-bottom: 1em;
	text-align: center;
}

/* These are characteristics specific to each
header size. */

h1 {
	font-size: 16px;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: #999999;
}

h2 {
	font-size: 32px;
	line-height: 1.3em;
	color: #2e9385;
}

h3 {
	margin-top: 1em;
	font-size: 18px;
	color: #999999;
}

/* This sets the color and style for hyperlinks. */

a {
	color: #2e9385;
}

a:hover {
	text-decoration: underline;
}

/* HEADER
======================
This contains the header and navigation.
*/

header {
	margin-bottom: 60px;
	padding-top: 60px;
	padding-bottom: 60px;
	background-image: url("../pictures/header-background.png");
	background-size: cover;
	text-align: center;
}

nav {
	margin-top: 20px;
}

nav ul li {
	display: inline; /* puts all list items on the same line */
}

nav ul li a {
	padding-left: 15px;
	padding-right: 15px;
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: 0.25em;
	font-weight: bold;
	color: #ffffff;
	text-align: center;
}

nav ul li a:hover {
	color: #2e9385;
	text-decoration: none;
}

/* CONTENT
======================
This is a wrapper container holding the main
content and the sidebar.
*/

.content {
	max-width: 800px;
	margin: 0 auto;
}

img {
	display: block;
	margin-left: auto;
	margin-right: auto;
	padding-bottom: 20px;
}
/* MAIN
======================
This contains the main content (About, 
etc).
*/

main {
	max-width: 800px;
	float: center;
	font-size: 18px;
}

/* SIDEBAR
======================
This contains the sidebar content.
*/

aside {
	max-width: 180px;
	float: right;
	text-align: center; /* centers everything in sidebar */
}

aside div {
	margin-bottom: 3em; /* spaces out each section */
}

aside .profile img {
	border-radius: 180px; /* make image into circle! */
}

/* FOOTER
======================
This contains the copyright.
*/

footer {
	clear: both; /* go to new line instead of between floats */
	padding-top: 60px;
	padding-bottom: 60px;
	color: #999999;
	font-size: 14px;
	text-align: center;
}

* {
  box-sizing: border-box;
}

/* Set a background color */
body {
  background-color: #ffffff;
  font-family: Helvetica, sans-serif;
}

/* The actual timeline (the vertical ruler) */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/* The actual timeline (the vertical ruler) */
.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: black;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

/* Container around content */
.container {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* The circles on the timeline */
.container::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  right: -17px;
  background-color: white;
  border: 4px solid #2e9385;
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

/* Place the container to the left */
.left {
  left: 0;
}

/* Place the container to the right */
.right {
  left: 50%;
}

/* Add arrows to the left container (pointing right) */
.left::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  right: 30px;
  border: medium solid white;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent white;
}

/* Add arrows to the right container (pointing left) */
.right::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  left: 30px;
  border: medium solid white;
  border-width: 10px 10px 10px 0;
  border-color: transparent white transparent transparent;
}

/* Fix the circle for containers on the right side */
.right::after {
  left: -16px;
}

/* The actual content */
.content {
  padding: 20px 30px;
  background-color: white;
  position: relative;
  border-radius: 6px;
}

/* Media queries - Responsive timeline on screens less than 600px wide */
@media screen and (max-width: 600px) {
/* Place the timelime to the left */
  .timeline::after {
    left: 31px;
  }

/* Full-width containers */
  .container {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

/* Make sure that all arrows are pointing leftwards */
  .container::before {
    left: 60px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }

/* Make sure all circles are at the same spot */
  .left::after, .right::after {
    left: 15px;
  }

/* Make all right containers behave like the left ones */
  .right {
    left: 0%;
  }
}
Try it Yourself »
