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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <!-- saved from url=(0014)about:internet -->
<!DOCTYPE html>
<html>

    <head>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta content="width=device-width, initial-scale=1" name="viewport">
        <meta content="2021-02-20 00:26:22" name="revised">
        <title></title>
        <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed&display=swap" as="style" type="text/css" rel="stylesheet preload prefetch" />
        <script src="https://code.jquery.com/jquery-3.5.1.min.js" type="text/javascript"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js" type="text/javascript"></script>
        <link href="https://cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css" as="style" type="text/css" rel="stylesheet preload prefetch" />
        <link href="https://cdn.datatables.net/select/1.3.1/css/select.dataTables.min.css" as="style" type="text/css" rel="stylesheet preload prefetch" />
        <script src="https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js" type="text/javascript"></script>
        <script src="https://cdn.datatables.net/select/1.3.1/js/dataTables.select.min.js" type="text/javascript"></script>
        <script src="https://cdn.datatables.net/plug-ins/1.10.20/sorting/datetime-moment.js" type="text/javascript"></script>
        <link href="https://cdn.datatables.net/buttons/1.6.5/css/buttons.dataTables.min.css" as="style" type="text/css" rel="stylesheet preload prefetch" />
        <script src="https://cdn.datatables.net/buttons/1.6.5/js/dataTables.buttons.min.js" type="text/javascript"></script>
        <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.html5.min.js" type="text/javascript"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js" type="text/javascript"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js" type="text/javascript"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js" type="text/javascript"></script>
        <link href="https://cdn.datatables.net/responsive/2.2.7/css/responsive.dataTables.min.css" as="style" type="text/css" rel="stylesheet preload prefetch" />
        <script src="https://cdn.datatables.net/responsive/2.2.7/js/dataTables.responsive.min.js" type="text/javascript"></script>
        <style>
            body {
                font-family: 'Roboto Condensed', sans-serif;
                font-size: 8pt;
                margin: 0px;
            }

            input {
                font-size: 8pt;
            }
        </style>
        <style>
            td {
                height: 14px;
            }

            tfoot input {
                width: 100%;
                box-sizing: border-box;
                padding: -3px;
            }

            thead input {
                width: 100%;
                box-sizing: border-box;
                padding: -3px;
            }

            td::before,
            td.sorting_1::before {
                background-color: #007bff !important;
            }

            button.dt-button {
                color: blue !important;
                border-radius: 5px;
                line-height: 1 !important;
            }

            div.dataTables_wrapper {
                margin: 5px;
            }
        </style><noscript>
            <style type="text/css">
                table {
                    border-collapse: collapse;
                    box-sizing: border-box;
                    width: 100%;
                }

                table td {
                    border-width: 1px;
                    padding: 4px;
                    text-align: left;
                    border-top: 1px solid #ddd;
                }

                table thead th {
                    text-align: center;
                    font-weight: bold;
                    padding: 4px 17px;
                    border-bottom: 1px solid #111;
                    background-color: white;
                    color: black;
                }

                table tfoot th {
                    text-align: center;
                    font-weight: bold;
                    padding: 4px 17px;
                    border-top: 1px solid #111;
                    background-color: white;
                    color: black;
                }

                table tr:nth-of-type(odd) {
                    background-color: #F6F6F5;
                }

                table tr:nth-of-type(even) {
                    background-color: white;
                }

                table td,
                table th {
                    border: 1px solid black;
                }
            </style>
        </noscript>
        <style>
            .overflowHidden {
                overflow: hidden;
                overflow-x: hidden;
                overflow-y: hidden;
            }

            .flexParent {
                display: flex;
                justify-content: space-between;
            }

            .flexParentInvisible {
                display: flex;
                justify-content: space-between;
            }

            .flexElement {
                flex-basis: 100%;
            }

            .flexPanel {
                flex-basis: 100%;
            }

            .flex-grid {
                display: flex;
            }
        </style>
    </head>

    <body>
        <div class="main-section">
            <script>                $(document).ready(function () {
                    $.fn.dataTable.moment('L');

                    // Setup - Looading text input from SavedState
                    $('#DT-rFjGFraQ').on('stateLoaded.dt', function (e, settings, data) {
                        settings.aoPreSearchCols.forEach(function (col, index) {
                            if (col.sSearch) setTimeout(function () {
                                $('#DT-rFjGFraQ thead th:eq(' + index + ') input').val(col.sSearch)
                            }, 50)
                        })
                    });
                    // Setup - Looading text input from SavedState
                    $('#DT-rFjGFraQ').on('stateLoaded.dt', function (e, settings, data) {
                        settings.aoPreSearchCols.forEach(function (col, index) {
                            if (col.sSearch) setTimeout(function () {
                                $('#DT-rFjGFraQ tfoot th:eq(' + index + ') input').val(col.sSearch)
                            }, 50)
                        })
                    });
                    // Setup - add a text input to each header cell
                    $('#DT-rFjGFraQ thead th').each(function () {
                        var title = $(this).text();
                        $(this).html('<input type="text" placeholder="' + title + '" />');
                    });
                    // Setup - add a text input to each footer cell
                    $('#DT-rFjGFraQ tfoot th').each(function () {
                        var title = $(this).text();
                        $(this).html('<input type="text" placeholder="' + title + '" />');
                    });
                    //  Table code
                    var table = $('#DT-rFjGFraQ').DataTable(
                        {
                            "dom": "Bfrtip",
                            "searchFade": false,
                            "scrollCollapse": false,
                            "ordering": true,
                            "order": [],
                            "rowGroup": "",
                            "info": true,
                            "procesing": true,
                            "select": true,
                            "searching": true,
                            "stateSave": true,
                            "paging": true,
                            "pagingType": ["full_numbers"],
                            "lengthMenu": [[15, 25, 50, 100, -1], [15, 25, 50, 100, "All"]],
                            "buttons": [{
                                "extend": "copyHtml5"
                            }, {
                                "extend": "excelHtml5",
                                "exportOptions": {
                                    "columns": ":visible",
                                    "format": {
                                        body: function (data, row, column, node) {
                                            data = $('<p>' + data + '</p>').text(); return $.isNumeric(data.replace(',', '.')) ? data.replace(',', '.') : data;
                                        }
                                    }
                                }
                            }, {
                                "extend": "csvHtml5"
                            }, {
                                "extend": "pdfHtml5",
                                "pageSize": "A3",
                                "orientation": "landscape"
                            }, {
                                "extend": "pageLength"
                            }],
                            "responsive": {
                                "details": {
                                    "type": "inline"
                                }
                            }
                        }
                    );
                    // Apply the search for header cells
                    table.columns().eq(0).each(function (colIdx) {
                        $('input', table.column(colIdx).header()).on('keyup change', function () {
                            table
                                .column(colIdx)
                                .search(this.value)
                                .draw();
                        });

                        $('input', table.column(colIdx).header()).on('click', function (e) {
                            e.stopPropagation();
                        });
                    });
                    // Apply the search for footer cells
                    table.columns().every(function () {
                        var that = this;

                        $('input', this.footer()).on('keyup change', function () {
                            if (that.search() !== this.value) {
                                that.search(this.value, false, true).draw();
                            }
                        });
                    });


                });</script>
            <div class="flexElement overflowHidden">
                <table width="100%" id="DT-rFjGFraQ" class="dataTables display compact">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Time</th>
                            <th>Money</th>
                            <th>Taxes</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>My Object 1</td>
                            <td>1</td>
                            <td>5</td>
                            <td>20</td>
                        </tr>
                        <tr>
                            <td>My Object 2</td>
                            <td>3</td>
                            <td>1</td>
                            <td>5</td>
                        </tr>
                        <tr>
                            <td>My Object 3</td>
                            <td>12</td>
                            <td>5</td>
                            <td>1</td>
                        </tr>
                    </tbody>
                    <tfoot>
                        <tr>
                            <th>Name</th>
                            <th>Time</th>
                            <th>Money</th>
                            <th>Taxes</th>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </body>

</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console