Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <a href="http://dribbble.com/shots/966016-Messages?list=users" style="color:#09c; padding:20px; display:block; clear:both; text-align:center;">A HTML version of 'Messages' by Coleman Tharp</a>

<div class="container">
  <div class="header">
    <h2>Messages</h2>
    <a href="#" title="Add Friend to this chat">+</a>
  </div>
  <div class="chat-box">
    <div class="message-box left-img">
      <div class="picture">
        <img src="https://dribbble.s3.amazonaws.com/users/2493/avatars/original/joey_head_new.png?1346157876" title="user name"/>
        <span class="time">10 mins</span>
      </div>
      <div class="message">
        <span>Bobby Giangeruso</span>
        <p>Hey Mike, how are you doing?</p>
      </div>
    </div>
    <div class="message-box right-img">
      <div class="picture">
        <img src="https://dribbble.s3.amazonaws.com/users/212696/avatars/small/monogram_pixel_perfect.png?1359994784" title="user name"/>
        <span class="time">2 mins</span>
      </div>
      <div class="message">
        <span>Mike Moloney</span>
        <p>Pretty good, Eating nutella, nommommom</p>
      </div>
    </div>
    <div class="enter-message">
      <input type="text" placeholder="Enter your message.."/>
      <a href="#" class="send">Send</a>
    </div>
  </div>
</div>
              
            
!

CSS

              
                *{
  font-family:'Helvetica Neue',Helvetica, sans-serif;
  font-size:14px;
  margin:0;
}
a{
  font-weight:bold;
  color:#fff;
  text-decoration:none;
}
.container{
  width:400px;
  display:block;
  margin:0 auto;
  box-shadow:0 2px 5px rgba(0,0,0,0.4);
}
.header{
  padding:20px 20px 18px 20px;
  background:#5FB471;
  color:#fff;
}
.header h2{
  font-size:16px;
  line-height:15px;
  display:inline-block;
}
.header a{
  display:inline-block;
  float:right;
  background:#3d8b4e;
  font-size:25px;
  line-height:20px;
  padding:3px 6px;
  margin-top:-5px;
  border-radius:2px;
}
.chat-box, .enter-message{
  background:#ECECEC;
  padding:0 20px;
  color:#a1a1a1;
}
.chat-box .message-box{
  padding:18px 0 10px;
  clear:both;
}
.message-box .picture{
  float:left;
  width:50px;
  display:block;
  padding-right:10px;
}
.picture img{
  width:43px;
  height:48px;
  border-radius:5px;
}
.picture span{
  font-weight:bold;
  font-size:12px;
  clear:both;
  display:block;
  text-align:center;
  margin-top:3px;
}
.message{
  background:#fff;
  display:inline-block;
  padding:13px;
  width:274px;
  border-radius:2px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
  position:relative;
}
.message:before{
  content:"";
  position:absolute;
  display:block;
  left:0;
  border-right:6px solid #fff;
  border-top: 6px solid transparent;
  border-bottom:6px solid transparent;
  top:10px;
  margin-left:-6px;
}
.message span{
  color:#555;
  font-weight:bold;
}
.message p{
  padding-top:5px;
}
.message-box.right-img .picture{
  float:right;
  padding:0;
  padding-left:10px;
}
.message-box.right-img .picture img{
  float:right;
}
.message-box.right-img .message:before{
  left:100%;
  margin-right:6px;
  margin-left:0;
  border-right:6px solid transparent;
  border-left:6px solid #fff;
  border-top: 6px solid transparent;
  border-bottom:6px solid transparent;
}
.enter-message{
  padding:13px 0px;
}
.enter-message input{
  border:none;
  padding:10px 12px;
  background:#d3d3d3;
  width:260px;
  border-radius:2px;
}
.enter-message a.send{
  padding:10px 15px;
  background:#6294c2;
  border-radius:2px;
  float:right;
}
              
            
!

JS

              
                $(function(){
        
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!

var yyyy = today.getFullYear();
if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} today = mm+'/'+dd+'/'+yyyy;
      });

              
            
!
999px

Console