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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              <!-- SIMPLE TEXT IN DIV - TABLE-CELL -->
<div class='table-cnt'>
  <div class='tbl-div'><span>It's no problem to center<br />a multiple lines of text</span></div>
</div>
<!-- SIMPLE TEXT IN DIV - FLEX -->
<div class='flex-cnt'>
  <div class='flex-div'>It's no problem to center<br />a multiple lines of text</div>
</div>
<div class='eol'></div>
<!-- SIMPLE IMAGE IN DIV - TABLE-CELL -->
<div class='table-cnt'>
  <div class='tbl-div'><span><img src='https://www.nawt.org.uk/sites/default/files/pet_cat.jpg' /></span></div>
</div>
<!-- SIMPLE IMAGE IN DIV - FLEX -->
<div class='flex-cnt'>
  <div class='flex-div'><img src='https://www.nawt.org.uk/sites/default/files/pet_cat.jpg' /></div>
</div>
<div class='eol'></div>
<!-- IMAGE BUTTON - TABLE-CELL -->
<div class='table-cnt'>
  <a href='#' class='tbl-btn'>
    <span><img src='http://forums.mp3tag.de/style_emoticons/default/mt_save.png' /></span>
    <span>Save<span>
  </a>
</div>
<!-- IMAGE BUTTON - FLEX -->
<div class='flex-cnt'>
  <a href='#' class='flex-btn'><img src='http://forums.mp3tag.de/style_emoticons/default/mt_save.png' />Save</a>
</div>
<div class='eol'></div>
<!-- IMAGE WRAPPING - TABLE-CELL -->
<div class='table-cnt'>
  <div class='wrap-tbl'>
    <span>
    <div class='wrap-cnt'>
      <img src='http://cdn.altrn.tv/icons/talking-dog-max_52880.png?width=50&height=50&mode=crop&anchor=middlecenter' />
      This content with image and text is an example of perfect centering of content inside its holder, both vertically and horizontally.
    </div>
    </span>
  </div>
</div>
<div class='flex-cnt'>
  <div class='wrap-flex'> 
    <div class='wrap-cnt'>
      <img src='http://cdn.altrn.tv/icons/talking-dog-max_52880.png?width=50&height=50&mode=crop&anchor=middlecenter' />
      This content with image and text is an example of perfect centering of content inside its holder, both vertically and horizontally.
    </div>
  </div>  
</div>
<div class='eol'></div>
<!-- VERTICAL MENU - TABLE-CELL -->
<div class='table-cnt'>
  <ul class='vmenu-tbl'>
    <li>
        <span><img src='http://fanpagelist.com/images/facebook-16x16.png' /></span>
        <span>Facebook</span>
    </li>
    <li>
        <span><img src='https://storage.googleapis.com/support-kms-prod/SNP_9B7B9323F9C58C607BB1304DF281C297E027_6072814_en_v0' /></span>
        <span>Google+</span>
    </li>
    <li>
        <span><img src='http://cdn.twitrcovers.com/wp-content/themes/twitrcovers/images/twitter-2.png' /></span>
        <span>Twitter</span>
    </li>
    <li>
        <span><img src='https://www.redditstatic.com/spreddit4.gif' /></span>
        <span>Reddit</span>
    </li>
  </ul>
</div>
<!-- VERTICAL MENU - FLEX -->
<div class='flex-cnt'>
  <ul class='vmenu-flex'>
  <li><img src='http://fanpagelist.com/images/facebook-16x16.png' />Facebook</li>
  <li><img src='https://storage.googleapis.com/support-kms-prod/SNP_9B7B9323F9C58C607BB1304DF281C297E027_6072814_en_v0' />Google+</li>
  <li><img src='http://cdn.twitrcovers.com/wp-content/themes/twitrcovers/images/twitter-2.png' />Twitter</li>
  <li><img src='https://www.redditstatic.com/spreddit4.gif' />Reddit</li>
  </ul>
</div>
<div class='eol'></div>
<!-- HORIZONTAL MENU - TABLE-CELL -->
<div class='table-cnt'>
  <ul class='hmenu-tbl'>
    <li>
      <span class='li-tbl'>
        <span><img src='http://fanpagelist.com/images/facebook-16x16.png' /></span>
        <span>Facebook</span>
      </span>
    </li>
    <li>
      <span class='li-tbl'>
        <span><img src='https://storage.googleapis.com/support-kms-prod/SNP_9B7B9323F9C58C607BB1304DF281C297E027_6072814_en_v0' /></span>
        <span>Google+</span>
      </span>
    </li>
    <li>
      <span class='li-tbl'>
        <span><img src='http://cdn.twitrcovers.com/wp-content/themes/twitrcovers/images/twitter-2.png' /></span>
        <span>Twitter</span>
      </span>
    </li>
    <li>
      <span class='li-tbl'>
        <span><img src='https://www.redditstatic.com/spreddit4.gif' /></span>
        <span>Reddit</span>
      </span>
    </li>
  </ul>
</div>
<!-- HORIZONTAL MENU - FLEX -->
<div class='flex-cnt'>
  <ul class='hmenu-flex'>
  <li><img src='http://fanpagelist.com/images/facebook-16x16.png' />Facebook</li>
  <li><img src='https://storage.googleapis.com/support-kms-prod/SNP_9B7B9323F9C58C607BB1304DF281C297E027_6072814_en_v0' />Google+</li>
  <li><img src='http://cdn.twitrcovers.com/wp-content/themes/twitrcovers/images/twitter-2.png' />Twitter</li>
  <li><img src='https://www.redditstatic.com/spreddit4.gif' />Reddit</li>
  </ul>
</div>
<div class='eol'></div>
<!-- CHECKBOXES - TABLE-CELL -->
<div class='table-cnt'>
  <div class='chkbxs-group-tbl'>
    <div class='chkbxs-tbl'><span><input type='checkbox' /></span><span>Option #1</span></div>
    <div class='chkbxs-tbl'><span><input type='checkbox' /></span><span>Option #2</span></div>
    <div class='chkbxs-tbl'><span><input type='checkbox' /></span><span>Option #3</span></div>
  </div>
</div>
<!-- CHECKBOXES - FLEX -->
<div class='flex-cnt'>
  <div class='chkbxs-group-flex'>
    <div class='chkbxs-flex'><input type='checkbox' /><span>Option #1</span></div>
    <div class='chkbxs-flex'><input type='checkbox' /><span>Option #2</span></div>
    <div class='chkbxs-flex'><input type='checkbox' /><span>Option #3</span></div>
  </div>
</div>
<div class='eol'></div>
<div class='eol'></div>
            
          
!
            
              body {
  font-size: 18px;
  margin: 24px;
}
.table-cnt {
  float: left; 
  margin: 0 60px 24px 0;
}
.flex-cnt {
  float: left; 
}
.eol {
  display: block; 
  clear: both;
  height: 32px;
}
/* SIMPLE TEXT AND IAMGE IN DIV - TABLE-CELL */
.tbl-div {
  display: table;
  width: 400px;
  height: 120px;
  background-color: #ffe6cc;
  border: solid 1px gray;
}
.tbl-div > span {
  display: table-cell;
  text-align: center;
  vertical-align: middle; 
}
/* SIMPLE TEXT AND IAMGE IN DIV - FLEX */
.flex-div {
  display: flex;
  width: 400px;
  height: 120px;
  justify-content: center;
  align-items: center;
  background-color: #f0fff0;
  border: solid 1px gray;
}
/* IMAGE BUTTON - TABLE-CELL */
.tbl-btn {
  display: table;
  color: black;
  text-decoration: none;  
  padding: 6px 24px 6px 24px;
  background-color: #ffe6cc;
  border: solid 1px lightgray; 
  border-radius: 4px;
}
.tbl-btn span  {
  display: table-cell;
  vertical-align: middle;
}
.tbl-btn img {
  float: left;
  margin-right: 6px;
}
/* IMAGE BUTTON - FLEX */
.flex-btn {
  display: flex;
  align-items: center;
  color: black;
  text-decoration: none;
  padding: 6px 24px 6px 24px;
  background-color: #f0fff0;
  border: solid 1px lightgray; 
  border-radius: 4px;
}
.flex-btn img {
  margin-right: 6px;
}
/* IMAGE WRAPPING - TABLE_CELL */
.wrap-tbl {
  display: table;
  width: 400px;
  height: 200px;
  background-color: #ffe6cc;
  border: solid 1px gray;
}
.wrap-tbl > span {
  display: table-cell;
  text-align: center;
  vertical-align: middle;  
}
/* IMAGE WRAPPING - FLEX */
.wrap-flex {
  display: flex;
  width: 400px;
  height: 200px;
  justify-content: center;
  align-items: center;
  background-color: #f0fff0;
  border: solid 1px gray;
}
.wrap-cnt {
  display: inline-block;
  width: 220px;
  font-size: 16px;
  text-align: justify; 
  padding: 12px;
  background-color: #d7ffff;
  border: solid 1px gray;  
  box-shadow: 2px 2px 8px #c0c0c0;
}
.wrap-cnt img {
  padding-right: 10px;
  float: left;
}
/* VERTICAL MENU - TABLE_CELL */
.vmenu-tbl {
  list-style: none;
  padding-left: 0;
  font-size: 15px;
}
.vmenu-tbl li {
  display: table;
  width: 100%;
  margin: 0 0 2px 0;
  padding: 4px 0 4px 8px;
  background-color: #ffe6cc;
  border: solid 1px lightgray;  
}
.vmenu-tbl span {
  display: table-cell;
  text-align: left;
  vertical-align: middle;
}
.vmenu-tbl span:first-child {
  width: 22px;
}
.vmenu-tbl img {
  float: left; 
  margin-right: 6px;
}
/* VERTICAL MENU - FLEX */
.vmenu-flex {
  list-style: none;
  padding-left: 0;
  font-size: 15px;
}
.vmenu-flex li {
  display: flex;
  align-items: center;
  padding: 4px 8px 4px 8px;
  margin-bottom: 2px;
  background-color: #f0fff0;
  border: solid 1px lightgray;
}
.vmenu-flex img {
  margin-right: 6px;
}
/* HORIZONTAL MENU - TABLE_CELL */
.hmenu-tbl {
  display: inline-block;
  list-style: none;
  padding-left: 0;
  font-size: 16px;
  border: solid 1px lightgray;
}
.hmenu-tbl li {
  float: left;
  padding: 10px 20px 10px 10px;
  background-color: #ffe6cc;
}
.li-tbl {
  display: table;
}
.li-tbl span {
  display: table-cell;
  vertical-align: middle;
  font-size: 16px;
}
.li-tbl img {
  float: left;
  margin-right: 6px;
}
/* HORIZONTAL MENU - FLEX */
.hmenu-flex {
  display: inline-block;
  list-style: none;
  padding-left: 0;
  font-size: 16px;
  border: solid 1px lightgray;
}
.hmenu-flex li {
  float: left;
  display: flex;
  align-items: center;
  padding: 10px 20px 10px 10px;
  background-color: #f0fff0;
}
.hmenu-flex img {
  margin-right: 6px;
}
/* CHECKBOXES - TABLE_CELL */
.chkbxs-group-tbl {
  display: block;
  padding: 16px 32px 16px 24px;
  background-color: #ffe6cc;
  border: solid 1px lighgray;
  border-radius: 3px;
}
.chkbxs-tbl {
  font-size: 16px;
  display: table;
  padding: 0 0 4px 0;
}
.chkbxs-tbl > span {
  display: table-cell;
  vertical-align: middle;
}
.chkbxs-tbl > span:last-child {
  padding-left: 6px;
}
/* CHECKBOXES - FLEX */
.chkbxs-group-flex {
  display: block;
  padding: 16px 32px 16px 24px;
  background-color: #f0fff0;
  border: solid 1px lightgray;
  border-radius: 3px;
}
.chkbxs-flex {
  font-size: 16px;
  display: flex;
  align-items: center;
  padding: 0 0 4px 0;
}
.chkbxs-flex > span {
  padding-left: 6px;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console