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

              
                <div class="directory-lister-wrapper " id="directory-lister" layout="horizontal" mainpath="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900" mobile_version_breakpoint="767">
  <div class="slozka zobrazit-slozku full-inside" path="Année 1886"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1886
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 249px;">
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1886/Num. 14 – Fevrier 1894.pdf">Num. 14 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1886/Num. 15 – Fevrier 1894.pdf">Num. 15 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1886/Num. 16 – Mars 1894.pdf">Num. 16 – Mars 1894.pdf</a><br>
      </div>
    </div>
  </div>
  <div class="slozka zobrazit-slozku full-inside" path="Année 1887"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1887
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 249px;">
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1887/Num. 14 – Fevrier 1894.pdf">Num. 14 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1887/Num. 15 – Fevrier 1894.pdf">Num. 15 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1887/Num. 16 – Mars 1894.pdf">Num. 16 – Mars 1894.pdf</a><br>
      </div>
    </div>
  </div>
  <div class="slozka zobrazit-slozku full-inside" path="Année 1888"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1888
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 249px;">
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1888/Num. 14 – Fevrier 1894.pdf">Num. 14 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1888/Num. 15 – Fevrier 1894.pdf">Num. 15 – Fevrier 1894.pdf</a><br>
      </div>
    </div>
  </div>
  <div class="slozka zobrazit-slozku full-inside" path="Année 1889"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1889
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 249px;">
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1889/Num. 14 – Fevrier 1894.pdf">Num. 14 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1889/Num. 15 – Fevrier 1894.pdf">Num. 15 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1889/Num. 16 – Mars 1894.pdf">Num. 16 – Mars 1894.pdf</a><br>
      </div>
    </div>
  </div>
  <div class="slozka zobrazit-slozku full-inside" path="Année 1890"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1890
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 249px;">
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1890/Num. 14 – Fevrier 1894.pdf">Num. 14 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1890/Num. 15 – Fevrier 1894.pdf">Num. 15 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1890/Num. 16 – Mars 1894.pdf">Num. 16 – Mars 1894.pdf</a><br>
      </div>
    </div>
  </div>
  <div class="slozka zobrazit-slozku empty-inside"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1891
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 35px;"></div>
  </div>
  <div class="slozka zobrazit-slozku empty-inside"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1892
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 35px;"></div>
  </div>
  <div class="slozka zobrazit-slozku full-inside" path="Année 1893"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1893
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 273px;">
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1893/Num. 1 – Juillet 1893.pdf">Num. 1 – Juillet 1893.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1893/Num. 3 – Aout 1893.pdf">Num. 3 – Aout 1893.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1893/Num. 4 – Septembre 1893.pdf">Num. 4 – Septembre 1893.pdf</a><br>
      </div>
    </div>
  </div>
  <div class="slozka zobrazit-slozku full-inside" path="Année 1894"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1894
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 249px;">
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1894/Num. 14 – Fevrier 1894.pdf">Num. 14 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1894/Num. 15 – Fevrier 1894.pdf">Num. 15 – Fevrier 1894.pdf</a><br>
      </div>
      <div class="soubor">
        <div class="sfdl-icon download-icon pdf"></div><a class="soubor-link" target="_blank" href="http://serveurpubli-deux.kamilane.odns.fr/ARCHIVES/JOURNAL/wp-content/uploads/PDF/1800-1900/Année 1894/Num. 16 – Mars 1894.pdf">Num. 16 – Mars 1894.pdf</a><br>
      </div>
    </div>
  </div>
  <div class="slozka zobrazit-slozku empty-inside"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1895
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 35px;"></div>
  </div>
  <div class="slozka zobrazit-slozku empty-inside"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1896
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 35px;"></div>
  </div>
  <div class="slozka zobrazit-slozku empty-inside"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1897
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 35px;"></div>
  </div>
  <div class="slozka zobrazit-slozku empty-inside"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1898
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 35px;"></div>
  </div>
  <div class="slozka zobrazit-slozku empty-inside"><span class="nazev-slozky" style="width: 180px;">
      <div class="sfdl-icon folder-icon"></div>Année 1899
    </span>
    <div class="child-wrapper schovat-slozku" style="max-width: 391.233px; margin-left: 12.1px; width: 35px;"></div>
  </div>

</div>
              
            
!

CSS

              
                #directory-lister {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  grid-auto-flow:row dense;
}
.slozka {grid-column:1;}
.empty-inside{display:none;}
              
            
!

JS

              
                window.onload = function () {
  let grid = document.querySelector("#directory-lister");
  let MyGrid = document.querySelectorAll("#directory-lister > .slozka");
  let emptyOnes = document.querySelectorAll("#directory-lister > .slozka.empty-inside" );
  dispatchStyle = document.createElement("style");
  let nextCol = Math.round((MyGrid.length - emptyOnes.length) / 2 + 1);
  dispatchStyle.textContent =
    "#directory-lister >  .slozka:nth-child(" + nextCol +") ~ .slozka {grid-column:2;}";
  grid.prepend(dispatchStyle);
};

              
            
!
999px

Console