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.

            
              <head>
  <title>Displaying Times and Dates</title>
  <link <link href="https://fonts.googleapis.com/css?family=Concert+One" rel="stylesheet"><!-- concert one font-->
</head>
<body>
  <div id="wrapper">
    <div id="redBox">
            
          
              <h1><div>Current Date and Time</div></h1>
                <div id="whiteBox">
               <script type="text/javascript">
 now = new Date ();
  localtime = now.toString();//sends the current time to the local time variable
  utctime = now.toGMTString();//sends the UTC time to the utc time variable
  //document.write("<p><strong>Local time:</strong>" + localtime + "</p>");writes up "local time" on the page
  //document.write("<p><strong>UTC time:</strong> " + utctime + "</p>" )writes up "utc time" on the page
  hours = now.getHours ();//goes and gets the hours for the clock
  mins = now.getMinutes ();//goes and gets the minutes for the clock
  secs = now.getSeconds ();//goes and gets the seconds for the clock
  milsecs = now.getMilliseconds ();//goes and gets the milliseconds for the clock
  document.write("<h2 id=freeflow>");//puts the clock time in bold
  
  document.write(hours + ":" + mins + ":" + secs + ":" + milsecs);//puts all the variables for the clock in a line

  document.write("</h2>")//closes the boldening
   
              </script><!--closes script-->
  <!--whiteBox-->
  </div><!--wrapper-->
    </div>
  </div>
  
</body>
            
          
!
            
              h2, h1{
  font-family: 'Concert One', cursive;
  z-index:2;
    text-align: center;
                }
 
#whiteBox{
  background-color: white;
  width: 400px;
  height: 70px;
  position: relative;
  margin-top: 0px;
    margin-left: 200px;
  z-index:1;
  border-style:solid;
  border-color:black
  
}  
 


h2 {
   font-size: 50px;
  top: -40px;
 
  }

#freeflow{
   position: relative;

  }

h1 div{
   position: relative;
  top: 10px
 
}

h1 {
  
   font-size: 50px;
  white-space: nowrap;
  
}
  #redBox{
    padding-top: 0px;
  margin-top:50px;
  width: 800px;
    height: 300px;
     background-color: red;
    position: absolute;
    left:0px;
      right:0px;
      z-index:0;
    box-shadow: 14px 10px 5px 0px rgba(0,0,0,0.75);
    border-style: solid;
    border-color: black;
    
    
}
#wrapper{
  margin: auto;
  width: 800px;
  height: 300px;
  position: relative;
  
 }
            
          
!
999px
Loading ..................

Console