Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

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

              
                <div class="container">
  <div class="row">
    <div class="col-xs-12 col-sm-6 col-md-5">
      <div class="card-tile">
        <img src="https://s3.amazonaws.com/adamlord/dmpc.png" alt="Dunder Mifflin Paper Company" class="img-responsive" />
        <div class="card-tile-details">
          <table>
            <tbody>
              <tr>
                <td rowspan="2" width="45%" class="card-rate">3.9</td>
                <td width="20%" class="card-rate unit">%</td>
                <td width="35%" class="card-credit-limit key">Credit Limit:</td>
              </tr>
              <tr>
                <td class="card-interest">APR</td>
                <td class="card-credit-limit value">$5,000</td>
              </tr>
            </tbody>
          </table>
          <div class="vertical-rule"></div>
        </div>
      </div>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-7">
      <h2>Sign up for our new credit card</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec augue urna. Proin sit amet consequat massa. Sed semper dolor a tortor lobortis, eu tristique tellus hendrerit. Cras condimentum arcu sed nulla fermentum, quis malesuada ipsum faucibus. Cras tincidunt augue ac libero pellentesque luctus. Nullam velit lectus, luctus non lobortis vestibulum, bibendum non velit. Phasellus velit nunc, bibendum rhoncus sem vitae, cursus luctus arcu. Nulla facilisi. Maecenas eu diam vitae sapien lacinia blandit. Cras sagittis vehicula posuere. Aliquam leo dolor, iaculis eu ipsum eu, rutrum gravida erat.</p>
    </div>
  </div>
</div>

              
            
!

CSS

              
                @import "lesshat";

.container {
  margin:50px auto;
}
.card-tile {
  /***************
  Define base font size for the tile */
  font-size:16px; 
  /****************/
  
  border:1px solid #020055;
  background:#f2f2f2;
  padding:1.5em;
  color:#020055;
  img {
    width:90%;
    margin:0 auto;
  }
  .card-tile-details {
    margin-top:1em;
    border:1px solid #020055;
    border-width:1px 0;
    padding:0.25em 0 0.75em;
    position:relative;
    table {
      margin: 0;
      width: 100%;
      td {
        position:relative;
      }
    }
    .card-rate {
      font-size:6.85em;
      line-height:90%;
      font-weight:700;
      letter-spacing:-0.075em;
      vertical-align:top;
      &.unit {
        font-size:3.5em;
        line-height:.8em;
        padding-bottom:0.15em;
        &:after {
          content:'';
          border-bottom:1px solid #020055;
          position:absolute;
          bottom:0;
          left:0;
          right:15%;
        }
      }
    }
    .card-interest {
      font-size:1.4em;
      line-height:1.33em;
      font-weight:500;
      letter-spacing:-0.025em;
      vertical-align: bottom;
    }
    .card-credit-limit {
      font-size:1.2em;
      line-height:1.15em;
      font-weight:300;
      letter-spacing:-0.025em;
      padding-left:0.75em;
      &:after {
        content:'';
        border-bottom:1px solid #020055;
        position:absolute;
        bottom:0;
        left:12%;
        right:0;
      }
      &.value {
        font-size:1.4em;
        line-height:133%;
        vertical-align: bottom;
        &:after {
          content:none;
        }
      }
    }
    .vertical-rule {
      position:absolute;
      border-left:1px solid #020055;
      top:10%;
      bottom:10%;
      left:66%;
    }
  }
}
@media (min-width:1200px){
  .card-tile {
    font-size:20px;
  }
}
@media (min-width: 992px) and (max-width: 1199px){
  .card-tile {
    /* This is redundant, but included for the sake of being explicit */
    font-size:16px;
  }
}
@media (min-width: 768px) and (max-width: 991px){
  .card-tile {
    font-size:14px;
  }
}
@media (max-width: 479px) {
  .card-tile {
    font-size:4.0vw;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console