cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

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

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="header">
  <i class="fa fa-coffee" aria-hidden="true"></i>
</div>
<div class="main">
  <h1>Coffee Calculator</h1>
  <script type="text/javascript"> 
var timer = 24; 
var d1 = new Date(); 
var d2 = new Date();
d1.setHours(+d2.getHours()+(timer/6) ); 
d1.setMinutes(new Date().getMinutes());
document.write("If you drink one cup of coffee right now 50% of the caffeine in your bloodstream should be gone in about four hours at <span style='color:rgba(130, 80, 68, 1);'>" + d1.getHours()+"h "+d1.getMinutes() + "min");
    if(d1.getHours()<12){
      document.write(" AM</span>.");
    }
    else {
      document.write(" PM</span>.");
    }
</script>
  <script type="text/javascript"> 
var timer = 24; 
var d1 = new Date(); 
var d2 = new Date();
d1.setHours(+d2.getHours()+(timer/3) ); 
d1.setMinutes(new Date().getMinutes()); 
document.write("<br /><br />It should be completely gone in eight hours at <span style='color:rgba(130, 80, 68, 1);'>" + d1.getHours()+"h "+d1.getMinutes() + "min");
    if(d1.getHours()<12){
      document.write(" AM</span>.");
    }
    else {
      document.write(" PM</span>.");
    }
</script>
  <div class="social"><p><br /><h2>Share this page!</h2></p>
  <div class="icon-container"><a href="https://www.facebook.com/sharer/sharer.php?u=https%3A//s.codepen.io/No46/full/VPJjVm/bYMdyGbNDQYr"><i class="fa fa-facebook" aria-hidden="true"></i></a></div>
  <div class="icon-container"><a href="https://twitter.com/home?status=When%20should%20I%20drink%20my%20last%20cup%20of%20coffee?%20%23coffee%20%23timer%20https%3A//s.codepen.io/No46/full/VPJjVm/bYMdyGbNDQYr">
    <i class="fa fa-twitter" aria-hidden="true"></i></a></div>
  </div></div>
<div class="footer">
  <h3>This page was created by <a href="http://ymoeller.de/">Yanic Möller</a>.</h3>
</div>
            
          
!
            
              body {
  background-color: rgba(149, 69, 53, 1);
  background-image:url("http://ymoeller.de/img/codepen/pinkdust.png");
}
.header {
  color: rgba(247, 243, 234, 1);
  text-align: center;
  background-image: url("http://ymoeller.de/img/codepen/zigzagwool.png");
  margin-left: auto;
  margin-right: auto;
  width:800px;
}
.header:hover {
  color:#202020;
}
h1 {
  text-align: center;
  color:rgba(130, 80, 68, 1);
  font-family: 'Reenie Beanie', cursive;
}
h2 {
  text-align: center;
  color:rgba(130, 80, 68, 1);
  font-family: 'Reenie Beanie', cursive;
}
.header i {
  margin-top: 100px;
  font-size: 150px;
  margin-bottom: 30px;
}
.main {
  background-color: rgba(247, 243, 234, 1);
  border-left-style:solid;
  border-right-style:solid;
  border-color:#000000;
  border-width:5px;
  width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: 35px;
  padding-right: 35px;
  text-align: left;
  font-family: Helvetica Neue,Helvetica,sans-serif;
}
.main i {
  font-size:30px;
}
.social {
  text-align: center;
}
.icon-container {
  #background-color:#000000;
  width: 80px;
  height: 80px;
  display: inline;
  padding: 30px;
  #border-radius: 50%;
}
.footer {
  padding-top: 30px;
  padding-bottom: 30px;
  text-align: center;
  width:800px;
  margin-left:auto;
  margin-right:auto;
  background-image:url("http://ymoeller.de/img/codepen/zigzagwool.png");
}
.footer h3 {
  font-size: 12px;
  color: #FFFFFF;
}
            
          
!
999px
Loading ..................

Console