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

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    <link rel="stylesheet" type="text/css" href="table.css">
    <script type="module" src="main.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
    integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA=="
    crossorigin=""/>
     <!-- Make sure you put this AFTER Leaflet's CSS -->
    <script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"
    integrity="sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg=="
    crossorigin=""></script>
</head>
<body>
    <main id="shell">
        <nav>Taskbar
            <button id="button">Open sidebar</button>
        </nav>
        <div id="workspace" class="workspace">
            <section>
                <div class="toolbar">Toolbar</div>
                <div class="app">
                    <div class="top-grid">
                        <table class="fixed_header">
                            <thead>
                                <tr>
                                    <td>Name</td>
                                    <td>Address</td>
                                    <td>Company</td>
                                    <td>Email</td>
                                    <td>UUID</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>Barclay Davis</td>
                                    <td>8587 Cursus St.</td>
                                    <td>Sagittis Lobortis Foundation</td>
                                    <td>ultricies@feugiatLoremipsum.co.uk</td>
                                    <td>6CD6F62F-EA14-1286-5602-A6740DA87218</td>
                                </tr>
                                <tr>
                                    <td>Rhonda J. Hewitt</td>
                                    <td>P.O. Box 729, 6863 Erat, Road</td>
                                    <td>Euismod Et Commodo Foundation</td>
                                    <td>aliquet.diam@Cumsociis.com</td>
                                    <td>1262D54D-C5DC-770F-4F26-A95C76C96366</td>
                                </tr>
                                <tr>
                                    <td>Idona Z. Walker</td>
                                    <td>9967 Risus St.</td>
                                    <td>Nunc Mauris Sapien Ltd</td>
                                    <td>orci@fermentumfermentum.org</td>
                                    <td>35EA6F2A-0871-4CB8-2E88-B6417D83A66B</td>
                                </tr>
                                <tr>
                                    <td>Hop T. Carney</td>
                                    <td>181-1044 Velit St.</td>
                                    <td>Dictum Augue Inc.</td>
                                    <td>magna.Suspendisse.tristique@feugiatmetus.co.uk</td>
                                    <td>457929DD-F3AB-6A32-3876-F35814449F5F</td>
                                </tr>
                                <tr>
                                    <td>Knox E. Strickland</td>
                                    <td>P.O. Box 833, 948 Eu, Rd.</td>
                                    <td>Et Industries</td>
                                    <td>arcu.Vestibulum@velturpis.com</td>
                                    <td>EA542A89-AD71-F0A8-6FE5-C2A2894FA2EF</td>
                                </tr>
                                <tr>
                                    <td>Brynn X. Wilkerson</td>
                                    <td>Ap #730-1672 Tristique Rd.</td>
                                    <td>Dignissim Tempor Incorporated</td>
                                    <td>varius.ultrices@odiovel.edu</td>
                                    <td>35537810-1B2A-68C1-C90D-82D20B3074F1</td>
                                </tr>
                                <tr>
                                    <td>Allistair G. Herring</td>
                                    <td>Ap #918-9483 Convallis Avenue</td>
                                    <td>Amet Consectetuer Limited</td>
                                    <td>elementum@Maurisvestibulumneque.net</td>
                                    <td>BAE1D1E4-FD52-FA57-27EA-C2D868DF4B6F</td>
                                </tr>
                                <tr>
                                    <td>Cadman F. Lowery</td>
                                    <td>9750 Consectetuer Street</td>
                                    <td>At Associates</td>
                                    <td>imperdiet.ornare@idanteNunc.ca</td>
                                    <td>7F2FC522-4AAC-8831-5A4F-9316B07D35A0</td>
                                </tr>
                                <tr>
                                    <td>Adena Perez</td>
                                    <td>564-9110 Semper Ave</td>
                                    <td>Maecenas Iaculis Aliquet Corporation</td>
                                    <td>molestie.sodales@Duisvolutpatnunc.com</td>
                                    <td>6626F0A7-C3E8-05E0-EB16-36E61C51922A</td>
                                </tr>
                                <tr>
                                    <td>Ivor Shepherd</td>
                                    <td>Ap #594-3673 At Street</td>
                                    <td>Leo Foundation</td>
                                    <td>magna.Phasellus@Suspendisse.com</td>
                                    <td>D58D30C9-24E0-D6BC-1AD8-A118B61A737B</td>
                                </tr>
                                <tr>
                                    <td>Solomon T. Ramos</td>
                                    <td>P.O. Box 153, 2387 Augue St.</td>
                                    <td>Metus PC</td>
                                    <td>accumsan.neque.et@necurnaet.com</td>
                                    <td>18F44731-43BD-BF77-3FA2-7BE04E7A20E6</td>
                                </tr>
                                <tr>
                                    <td>Cade Briggs</td>
                                    <td>465-679 Nam Avenue</td>
                                    <td>Risus Duis A Industries</td>
                                    <td>Cras@elitEtiam.edu</td>
                                    <td>D8C01021-160C-2463-0CD4-47F151FEF544</td>
                                </tr>
                                <tr>
                                    <td>Quinn R. Dale</td>
                                    <td>P.O. Box 926, 2901 Auctor, Ave</td>
                                    <td>Est Ltd</td>
                                    <td>cursus.a.enim@tempordiamdictum.ca</td>
                                    <td>7A2574D0-B1EC-F9BE-4E12-428C0DE915FE</td>
                                </tr>
                                <tr>
                                    <td>Baxter T. Oneil</td>
                                    <td>P.O. Box 227, 6190 Et, Rd.</td>
                                    <td>Mollis Corp.</td>
                                    <td>molestie.sodales@erosNam.co.uk</td>
                                    <td>14826A12-F815-9DD7-A3CD-4EF4CF746B9D</td>
                                </tr>
                                <tr>
                                    <td>Isaiah X. Chandler</td>
                                    <td>P.O. Box 165, 706 Tortor, St.</td>
                                    <td>Eget Dictum Limited</td>
                                    <td>In.scelerisque.scelerisque@dignissimlacus.net</td>
                                    <td>743A36AD-DFE3-62ED-975E-FCEED5C1DDDF</td>
                                </tr>
                                <tr>
                                    <td>Alfonso X. Vinson</td>
                                    <td>8551 Turpis Rd.</td>
                                    <td>Consectetuer Mauris Institute</td>
                                    <td>mi.pede.nonummy@erat.com</td>
                                    <td>49728271-417A-1FA5-C1BB-923FFD5F1F10</td>
                                </tr>
                                <tr>
                                    <td>Steel D. Middleton</td>
                                    <td>P.O. Box 409, 3109 Et Rd.</td>
                                    <td>Mi Ac Mattis Limited</td>
                                    <td>Nulla.dignissim@faucibusorci.edu</td>
                                    <td>C1C50034-D922-34C7-39BC-5A9159F0B3F7</td>
                                </tr>
                                <tr>
                                    <td>Mufutau Q. Williamson</td>
                                    <td>8068 Curabitur St.</td>
                                    <td>Lorem Ac PC</td>
                                    <td>Proin@scelerisque.net</td>
                                    <td>925C1655-BBAC-130D-424C-BBBF60BA4C6C</td>
                                </tr>
                                <tr>
                                    <td>Ima Stevenson</td>
                                    <td>459-6262 Ridiculus St.</td>
                                    <td>Dignissim Tempor Corporation</td>
                                    <td>ligula.Donec@nulla.net</td>
                                    <td>DD1804F0-944E-09C3-29A1-3A4C565C7659</td>
                                </tr>
                                <tr>
                                    <td>Aubrey L. Baird</td>
                                    <td>Ap #788-8908 Cras St.</td>
                                    <td>Velit Industries</td>
                                    <td>Nunc@aauctornon.net</td>
                                    <td>C5725AFC-E755-24BB-1C65-5352AF64BE40</td>
                                </tr>
                                <tr>
                                    <td>Nicholas Robertson</td>
                                    <td>P.O. Box 413, 2796 Molestie Rd.</td>
                                    <td>Tristique Aliquet Company</td>
                                    <td>odio.Etiam.ligula@nisi.com</td>
                                    <td>AD13D3FF-C8A6-4AC4-2ECE-8A5B123C0C3B</td>
                                </tr>
                                <tr>
                                    <td>Davis Jenkins</td>
                                    <td>P.O. Box 618, 664 Erat Rd.</td>
                                    <td>Dolor Quam Elementum LLP</td>
                                    <td>placerat.Cras@magnis.co.uk</td>
                                    <td>C71B7827-9F7B-96BF-C44A-21AC889AB428</td>
                                </tr>
                                <tr>
                                    <td>Josiah W. Emerson</td>
                                    <td>3136 Sodales St.</td>
                                    <td>Iaculis Quis Pede LLP</td>
                                    <td>eros.Proin.ultrices@et.com</td>
                                    <td>24B45823-FAF1-B68E-3F09-E760264F9394</td>
                                </tr>
                                <tr>
                                    <td>Ursula B. Hood</td>
                                    <td>Ap #348-7909 Pellentesque Rd.</td>
                                    <td>Vestibulum Mauris Magna Industries</td>
                                    <td>semper.pretium@dictumeuplacerat.com</td>
                                    <td>59971EF2-5E8A-290C-AD14-72674542325B</td>
                                </tr>
                                <tr>
                                    <td>Sloane Gutierrez</td>
                                    <td>3057 Aenean Av.</td>
                                    <td>Nibh LLC</td>
                                    <td>libero.Integer@rutrumurnanec.com</td>
                                    <td>989E4A26-A302-280A-43C8-18E256AD1C66</td>
                                </tr>
                                <tr>
                                    <td>Alana C. Wiley</td>
                                    <td>Ap #656-7866 Fermentum Avenue</td>
                                    <td>Nam Corp.</td>
                                    <td>elit.pede@pedenonummy.net</td>
                                    <td>10E97DE6-7E25-22FA-5768-A865E89AF50F</td>
                                </tr>
                                <tr>
                                    <td>Len Long</td>
                                    <td>Ap #898-1933 Quisque St.</td>
                                    <td>Nec Leo Industries</td>
                                    <td>et.arcu.imperdiet@egetvenenatis.net</td>
                                    <td>811DD5B2-2082-2BA7-C7C1-957781DB1176</td>
                                </tr>
                                <tr>
                                    <td>Raja I. Finley</td>
                                    <td>380 Maecenas Rd.</td>
                                    <td>Morbi Company</td>
                                    <td>hendrerit.a@doloregestasrhoncus.com</td>
                                    <td>B57745E5-4686-B80D-8A11-364D10F1D4DB</td>
                                </tr>
                                <tr>
                                    <td>Theodore P. Meyers</td>
                                    <td>Ap #848-9062 Erat, Ave</td>
                                    <td>Non Dapibus Rutrum Ltd</td>
                                    <td>tempor.erat.neque@ipsumdolorsit.co.uk</td>
                                    <td>9236D09D-B9D9-DA49-3ADC-B7B90C3F6CD6</td>
                                </tr>
                                <tr>
                                    <td>Colton Combs</td>
                                    <td>7215 Ac St.</td>
                                    <td>Feugiat Nec Incorporated</td>
                                    <td>tempor@Donec.org</td>
                                    <td>C60C50FD-40B6-6F9D-6785-FA992F1E1046</td>
                                </tr>
                                <tr>
                                    <td>Hyatt Weeks</td>
                                    <td>613-8461 Nam Street</td>
                                    <td>Vivamus Rhoncus Donec Incorporated</td>
                                    <td>nec@Donecluctus.org</td>
                                    <td>3ECB5803-E0F2-6B64-B4FD-F11354A315B3</td>
                                </tr>
                                <tr>
                                    <td>Octavia Hayden</td>
                                    <td>561-7147 Lectus. Ave</td>
                                    <td>Facilisis Corp.</td>
                                    <td>iaculis.quis@Aeneanmassa.ca</td>
                                    <td>46E4B054-4187-CF24-A6F7-D3B3D62525A6</td>
                                </tr>
                                <tr>
                                    <td>Ali I. Le</td>
                                    <td>Ap #154-9893 Vulputate Avenue</td>
                                    <td>Vulputate Nisi Sem Corporation</td>
                                    <td>sit@nec.net</td>
                                    <td>7F8B7EEC-2F23-EC6F-E645-BA1C2598E9CF</td>
                                </tr>
                                <tr>
                                    <td>Yuli P. Wagner</td>
                                    <td>448-2847 Vel Rd.</td>
                                    <td>Quis Pede Consulting</td>
                                    <td>enim.Nunc.ut@Fusce.com</td>
                                    <td>2FD539C8-459A-7757-64E1-CFD4A158EB14</td>
                                </tr>
                                <tr>
                                    <td>Joelle S. Glass</td>
                                    <td>P.O. Box 379, 1404 Sed St.</td>
                                    <td>Nunc Est Institute</td>
                                    <td>eget.varius.ultrices@vehicularisusNulla.ca</td>
                                    <td>0297488E-ADE3-5E51-28C1-4CA36C70764D</td>
                                </tr>
                                <tr>
                                    <td>Quinn Hardin</td>
                                    <td>Ap #188-3002 Ligula. Street</td>
                                    <td>Rhoncus Nullam Velit Consulting</td>
                                    <td>nec.urna@a.com</td>
                                    <td>186AB2BE-EF70-D6BD-E64C-62F3CE25918C</td>
                                </tr>
                                <tr>
                                    <td>Aladdin Hickman</td>
                                    <td>Ap #323-7075 Donec Avenue</td>
                                    <td>Nunc Pulvinar Arcu Ltd</td>
                                    <td>bibendum@dolorsitamet.ca</td>
                                    <td>54C94994-67DC-20BF-7F24-AA0822C5CF66</td>
                                </tr>
                                <tr>
                                    <td>Harrison Rodriquez</td>
                                    <td>8190 Ipsum St.</td>
                                    <td>Ornare Fusce Institute</td>
                                    <td>Nunc@imperdietornare.co.uk</td>
                                    <td>BB853F7A-D1E3-2971-F0F1-A445B491D270</td>
                                </tr>
                                <tr>
                                    <td>Christen Bright</td>
                                    <td>P.O. Box 819, 4077 Mollis Road</td>
                                    <td>Sociis Natoque Penatibus Foundation</td>
                                    <td>dapibus.rutrum.justo@purusactellus.net</td>
                                    <td>B1925C13-92AC-D54D-B63A-34305B8BC11C</td>
                                </tr>
                                <tr>
                                    <td>Eugenia Mann</td>
                                    <td>P.O. Box 789, 6346 Consectetuer Av.</td>
                                    <td>Purus Corporation</td>
                                    <td>venenatis.vel.faucibus@Loremipsumdolor.edu</td>
                                    <td>6B8C57F3-5EF7-134D-0F2D-E086250DE785</td>
                                </tr>
                                <tr>
                                    <td>Aidan T. Bright</td>
                                    <td>Ap #585-6482 Penatibus Avenue</td>
                                    <td>Ligula Consectetuer Rhoncus Limited</td>
                                    <td>convallis.in@consectetuer.org</td>
                                    <td>E17ED603-6EF1-9878-A248-D128C8E76DFE</td>
                                </tr>
                                <tr>
                                    <td>Dolan Welch</td>
                                    <td>P.O. Box 205, 1570 Neque Avenue</td>
                                    <td>Vulputate Mauris Sagittis Incorporated</td>
                                    <td>mauris.a@velitegetlaoreet.ca</td>
                                    <td>59883D23-9769-C56C-12FE-AB7C0D232AE6</td>
                                </tr>
                                <tr>
                                    <td>Dai Baxter</td>
                                    <td>2906 Dignissim. St.</td>
                                    <td>Pede Sagittis Augue LLC</td>
                                    <td>risus.at@neque.ca</td>
                                    <td>3BA46C96-EF5F-A01E-E799-7B73CA509528</td>
                                </tr>
                                <tr>
                                    <td>Lucy S. Clayton</td>
                                    <td>598-3550 Duis Av.</td>
                                    <td>Mus Donec Dignissim LLP</td>
                                    <td>diam.Sed@ligula.net</td>
                                    <td>2FF33E21-0953-8BA4-6C1C-28F6CF829582</td>
                                </tr>
                                <tr>
                                    <td>Jarrod F. Gentry</td>
                                    <td>131 Felis Av.</td>
                                    <td>Sit Amet Associates</td>
                                    <td>mauris@Phaselluselit.edu</td>
                                    <td>E86084C9-3680-F5E6-CF04-55D2934EA20D</td>
                                </tr>
                                <tr>
                                    <td>Timothy Tyler</td>
                                    <td>P.O. Box 906, 8222 Imperdiet St.</td>
                                    <td>Eu Limited</td>
                                    <td>arcu.vel@eueratsemper.ca</td>
                                    <td>50C8E1C6-3080-4194-1F21-9140FFBF5E44</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="bottom-grid">Bottom Grid</div>
                    <div id="map" class="map"></div>
                </div>
                <div class="statusbar">Statusbar</div>
            </section>
        </div>
    </main>
    <template id="template">
        <div id="sidebar" class="sidebar">Sidebar</div>
    </template>
</body>
</html>
              
            
!

CSS

              
                :root {
  --size-xs: 1.625rem;
  --size-m: 2.25rem;
  --size-sl: 3rem;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: Montserrat, sans-serif;
  text-rendering: geometricPrecision;
}

main {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  border: 5px solid red;
}
nav {
  min-height: var(--size-sl);
  border: 5px solid green;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}
button {
  margin: 0 1rem;
}

.workspace {
  max-height: calc(100% - var(--size-sl));
  flex: 1;
  border: 5px dotted dodgerblue;
  display: flex;
  flex-direction: row;
}

section {
  flex: 2;
  display: flex;
  flex-direction: column;
  border: 5px solid orange;
}

.toolbar {
  min-height: var(--size-m);
  border: 5px solid dodgerblue;
}

.app {
  width: 100%;
  height: calc(100% - var(--size-m) - var(--size-xs));
  display: grid;
  grid-template-columns: calc(50% - 0.25rem) 50%; /* Attention to grid-gap */
  grid-template-rows: calc(30% - 0.25rem) 70%;
  grid-gap: 0.25rem;
  border: 5px dotted black;
}

.top-grid {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  border: 5px solid black;
  overflow: auto;
}

.bottom-grid {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  border: 5px solid violet;
}

.map {
  width: 100%;
  height: 100%;
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  border: 5px solid gray;
}

.statusbar {
  min-height: var(--size-xs);
  border: 5px solid lime;
}

.sidebar {
  flex: 1;
  border: 5px solid blue;
}

/* Table styles */

table {
    width: 100%;
    border-collapse: collapse;
    position: relative;
    border: none;
}
  
thead td {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background: red;
    color: white;
    border: none;
    z-index: 1;
}
  
tbody td {
    min-width: 80px;
    width: 100px;
    /* max-width: 300px; */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

td {
    padding: 2px;
}

tbody tr:nth-child(odd) {
    background-color: rgba(230, 0, 0, 0.1);
}
  
.fixed_header tbody td {
    border: 1px dotted gray;
}
              
            
!

JS

              
                (function() {
  const btn = document.getElementById("button");
  btn.addEventListener("click", function() {
    const sidebar = document.getElementById("sidebar");
    const shell = document.getElementById("workspace");
    if (sidebar) {
      shell.removeChild(sidebar);
    } else {
      const template = document.getElementById("template");
      var clone = document.importNode(template.content, true);
      shell.appendChild(clone);
    }
  });

  let map = new L.map(document.getElementById("map"), {
    center: [56.94965, 24.1052],
    zoom: 13
  });

  const mapLink = '<a href="http://openstreetmap.org">OpenStreetMap</a>';

  L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
    attribution: `Map data &copy; ${mapLink} contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>`,
    maxZoom: 24,
    id: "leaflet.normal"
  }).addTo(map);
})();
              
            
!
999px

Console