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 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

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

              
                # Block of HTML scaled on small screens

<div class="wrapper">
<table>
    <thead>
        <tr>
        <th data-header="Features">
            Features
        </th>
        <th data-header="Express*" style="text-align:right">
            Express*
        </th>
        <th data-header="Personal PLUS" style="text-align:right" >
            Personal PLUS
        </th>
        <th data-header="Personal MAX" style="text-align:right">
            Personal MAX
        </th>
        <th data-header="Family" style="text-align:right">
            Family
        </th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <th>Summary</th>
            <td style="text-align:right">★★★</td>
            <td style="text-align:right">★★★★</td>
            <td style="text-align:right">★★★★★</td>
            <td style="text-align:right">★★★</td>
        </tr>
    </tfoot>
    <tbody>
        <tr>
        <td><strong>Main Features</strong></td>
        <td style="text-align:right"></td>
        <td style="text-align:right"></td>
        <td style="text-align:right"></td>
        <td style="text-align:right"></td>
        </tr>
        <tr>
        <td>Annual Load Limit</td>
        <td style="text-align:right">£ 300</td>
        <td style="text-align:right">£ 1,900</td>
        <td style="text-align:right">£ 12,000</td>
        <td style="text-align:right">£ 12,000</td>
        </tr>
        <tr>
        <td>Maximum card balance</td>
        <td style="text-align:right">£ 300</td>
        <td style="text-align:right">£ 1,900</td>
        <td style="text-align:right">£ 5,000</td>
        <td style="text-align:right">£ 5,000</td>
        </tr>
        <tr>
        <td>Reloadable</td>
        <td style="text-align:right"></td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>Available at Store</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>Available online</td>
        <td style="text-align:right">✘</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>UK ATM Access</td>
        <td style="text-align:right">✘</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>International ATM Access</td>
        <td style="text-align:right">✘</td>
        <td style="text-align:right">✘</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>Money share</td>
        <td style="text-align:right">✘</td>
        <td style="text-align:right">✘</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>Shop anywhere</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>Receive free International minutes</td>
        <td style="text-align:right">✘</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>Direct UK bank account loads</td>
        <td style="text-align:right">✘</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td><strong>Pricing</strong></td>
        <td style="text-align:right"></td>
        <td style="text-align:right"></td>
        <td style="text-align:right"></td>
        <td style="text-align:right"></td>
        </tr>
        <tr>
        <td>NO transaction fee</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        <td style="text-align:right">✔</td>
        </tr>
        <tr>
        <td>Additional card</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">£ 5.00</td>
        <td style="text-align:right">£ 5.00</td>
        </tr>
        <tr>
        <td>Card to card transfer</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">£ 1.00</td>
        <td style="text-align:right">FREE</td>
        </tr>
        <tr>
        <td>International ATM access</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">£ 1.50</td>
        <td style="text-align:right">FREE</td>
        </tr>
        <tr>
        <td>Foreign Exchange Charge</td>
        <td style="text-align:right">£ 1.95</td>
        <td style="text-align:right">£ 1.95</td>
        <td style="text-align:right">£ 1.95</td>
        <td style="text-align:right">FREE</td>
        </tr>
        <tr>
        <td>In-Store Card Purchase fee</td>
        <td style="text-align:right">£ 6.95</td>
        <td style="text-align:right">£ 6.95</td>
        <td style="text-align:right">£ 6.95</td>
        <td style="text-align:right">£ 6.95</td>
        </tr>
        <tr>
        <td>Monthly Cost</td>
        <td style="text-align:right">£ 3.95</td>
        <td style="text-align:right">£ 3.95</td>
        <td style="text-align:right">£ 3.95</td>
        <td style="text-align:right">£ 7.95</td>
        </tr>
        <tr>
        <td>Card to card transfer</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">£ 1.00</td>
        <td style="text-align:right">FREE</td>
        </tr>
        <tr>
        <td>International ATM access</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">n/a</td>
        <td style="text-align:right">£ 1.50</td>
        <td style="text-align:right">FREE</td>
        </tr>
        <tr>
        <td>Foreign Exchange Charge</td>
        <td style="text-align:right">£ 1.95</td>
        <td style="text-align:right">£ 1.95</td>
        <td style="text-align:right">£ 1.95</td>
        <td style="text-align:right">£ 1.95</td>
        </tr>
        <tr>
        <td>In-Store Card Purchase fee</td>
        <td style="text-align:right">£ 6.95</td>
        <td style="text-align:right">£ 6.95</td>
        <td style="text-align:right">£ 6.95</td>
        <td style="text-align:right">£ 6.95</td>
        </tr>
        <tr>
        <td>Monthly Cost</td>
        <td style="text-align:right">£ 3.95</td>
        <td style="text-align:right">£ 3.95</td>
        <td style="text-align:right">£ 3.95</td>
        <td style="text-align:right">£ 7.95</td>
        </tr>
    </tbody>
</table>
</div>

## Limitations

* You should know exact **width** and **height** of HTML block.
* You should know width of paddings, margins and side columns if any.
* You need to create custom breakpoint for min-width of the HTML-block

### Works only in Blink/Webkit
              
            
!

CSS

              
                @import (less) "https://codepen.io/paulradzkov/pen/Mygdrb"; // just decorations

body:not([class]) {
    margin: 40px; // fixed margins
}

table {
    min-width: 780px; // fixed min-width
    transform-origin: 0 0;
    
    // media max-width = table_min-width + body_margins
    @media (max-width: 860px) {
        // perspective is a dynamic width of the table = screen-width - body_margins
        // translateZ is a shoft = screen-width - table_min-width - body_margins
        transform: perspective(calc(~"100vw - 80px")) translateZ(calc(~"100vw - 80px - 780px"));
        
    }
}

.wrapper {
    @media (max-width: 860px) {
        max-height: calc(~"(100vw - 80px) * 1108 / 780"); //where 780px - table_min-width and 1108px - table_height on this width
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console