Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.


              <h1>2016 Potential Presidential Candidates</h1>
<section class="candidates-container">
  <ul class="Republican Party">
    <li data-candidate="Chris Christie"></li>
    <li data-candidate="Marco Rubio"></li>
    <li data-candidate="Paul Ryan"></li>
    <li data-candidate="Rand Paul"></li>
  <ul class="Democratic Party">
    <li data-candidate="Hillary Clinton"></li>
    <li data-candidate="Joe Biden"></li>
    <li data-candidate="Deval Patrick"></li>
    <li data-candidate="Martin O'Malley"></li>


              * { margin: 0; padding: 0; box-sizing: border-box; vertical-align: middle; }

html, body { height: 100%; }
body {
  font: 100%/1.4 "Oranienbaum";
  text-align: center;
  background: whitesmoke;
  padding: 1.5rem;

h1 {
  display: inline-block;
  font-weight: normal;
  border-bottom: thin solid black; }

.candidates-container {
  display: flex;
  min-height: 10rem;

.Party {
  flex: 1;
  padding: .875rem;
  &:before {
    display: block;
    font-size: 1.2rem;
    margin-bottom: .5rem;
    content: attr(class);  

.Republican {
  text-align: right;
  border-right: thin solid lightgray;

  [data-candidate] {
    background-color: lighten(red, 20%);
    float: right;

.Democratic {
  text-align: left;  

  [data-candidate] {
    background-color: lighten(blue, 25%);
    float: left;

$size: 7rem;
[data-candidate] {
  border-radius: .25s;
  cursor: pointer;
  position: relative;
  width: $size;
  height: $size;
  margin: .125rem;
  list-style: none;
  background-size: cover;
  background-position-x: center;
  background-blend-mode: multiply;
  transition: background-color .5s;
  &:hover {
    background-color: white;
    transition: background-color .25s;

[data-candidate="Chris Christie"] { background-image: url(; }

[data-candidate="Paul Ryan"] { background-image: url(; }

[data-candidate="Marco Rubio"] { background-image: url(; }

[data-candidate="Paul Ryan"] { background-image: url(; background-position-y: -.5rem; }

[data-candidate="Rand Paul"] { background-image: url(; }

[data-candidate="Ted Cruz"] { background-image: url(; }

[data-candidate="Hillary Clinton"] { background-image: url(; }

[data-candidate="Joe Biden"] { background-image: url(; }

[data-candidate="Andrew Cuomo"] { background-image: url(; }

[data-candidate="Martin O'Malley"] { background-image: url(; background-size: 80%; }

[data-candidate="Deval Patrick"] { background-image: url(; background-position-y: -.5rem; }

@font-face {
  font-family: 'Oranienbaum';
  font-style: normal;
  font-weight: 400;
  src: local('Oranienbaum'), local('Oranienbaum-Regular'), url( format('woff');

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans'), local('OpenSans'), url( format('woff');



Loading ..................