Inserting nth Child Striping to a Complex Flex Page

Hi everyone. @DaveMaxwell first helped me with this many moons ago and I’m resurrecting it because I liked the concept of it. But it lacked the yellow striping I’m so fond of so I made a blunder of attempting to drop it in on my own (yes, well) on LINES 75 & 76 with the most extraordinary result: it’s randomly picking out pieces of text and background coloring them yellow. It’s . . . interesting but not a disciplined proper striping effort.

Remember this one Dave? You got so frustrated with my stubborn refusal to put the 2 columns colA and colB in lowercase you probably wrote me off. :face_in_clouds: I’ve got religion now having been burned a few times too many to not realize what you and others were saying was gospel truth. Just those 2 letters can break the page! I’m a believer!

I’m uploading this fully formatted Gandalf. Anyway here it is again. Can we add some yellow striping? I’m not picky about this one; there are probably sections that simply cannot be striped. That’s okay. If we can just do even some of .colb I’ll be pleased. Thank you (anybody) wanting to take a look at this oldie but a goodie . . .

<!DOCTYPE HTML>
<HTML LANG="EN">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Calistoga&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Chicle&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Crete+Round:ital@0;1&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Diplomata&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,100;&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Henny+Penny&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Metal+Mania&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=New+Rocker&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Ribeye+Marrow&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Sancreek&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Solway:wght@300;400;500;700;800&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Special+Elite&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Uncial+Antiqua&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Vast+Shadow&display=swap" rel="stylesheet">

  <title>2 FLEX COLUMNS w&#47;a Child STRIPING &#9743; Courtesy Dave Maxwell of Sitepoint Forums</title>

  <style>
  /* lets use border box model so padding and borders are included inwidth*/
  html {
      box-sizing: border-box;
    }

    *,
    *:before,
    *:after {
      box-sizing: inherit;
    }

    /*lower case for selectors please */
    html,
    body {
      margin: 0;
      padding: 0;
    }

    p {
      margin: 0 0 1rem;
    }

    body {
      margin: .75rem 3% 2rem 3%;
      font-size: 1rem;
      line-height: 1;
      font-weight: 700;
      font-family: "Roboto Slab", sans-serif;
    }

    .crate {
      display: flex;
      flex-wrap: wrap;
      margin: 0 auto;
    }

    .crate:first-of-type {
      /*  REMOVED    border-top: 8px groove cyan;   */
    }
    .crate:last-of-type {
      border-bottom: 8px groove cyan;
    }

.colb :nth-child(odd){background-color: white; }
.colb :nth-child(even){background-color: #ffffcc; }

    /* colors */
    .cola .item {
      background: #eafeff;
    }

    .header {
      margin: 0;
      display: flex;
      flex: 1 0 100%;
      min-width: 0;
      line-height: 1;
      font-weight: 700;
      font-size: 1rem;
      font-family: 'roboto slab';
      border: 8px groove cyan;
      /* REMOVED since I placed groove on the ENTIRE header                border-top: 8px groove cyan;   */
    }

    .crate.header+.crate .item:first-child {
      border-top: 2px solid #000;
    }

    .colaheader,
    .colbheader {
      display: flex;
      flex-direction: column;
      margin: 0;
      min-width: 0;
      font-size: 1rem;
      text-align: center;
      text-shadow: 2px 2px #000;
      padding: .5rem; /* tweaked */
      background: #fff; /* was black */
    }
    /* new */
    .colaheader div,
    .colbheader div {
      background: #000;
      padding: .5rem;
      height: 100%;
    }

    .colaheader {
      flex: 1 0 54.4%;
      position: relative;
      justify-content: flex-end;
    }

    .colbheader {
      flex: 1 0 45%;
    }

    .colaheader+.colbheader {
      /*  how clever Dave!  */
    border-left: 8px groove cyan;
    }

    .colbheader {
      flex: 1 0 45%;
    }

    .crate.header:has(.colaheader + .colbheader)+.crate .item:first-child {
      border-top: 0px;
    }

    .cola {
      flex: 1 0 55%;
      border-left: 8px groove cyan;
      border-right: 1px solid #000;
    }

    .colb {
      flex: 1 0 45%;
      border-right: 8px groove cyan;
      border-left: 1px solid #000;
    }

    .cola,
    .colb {
      display: flex;
      flex-direction: column;
    }

    .item {
      line-height: 1;
      font-weight: 400;
      font-size: 1rem;
      padding: .31rem;
      border-bottom: 2px solid black;
      flex: 1 0 0;
      background: #ffffcc;
    }

    .crate:last-of-type .item:last-child {
      border-bottom: none;
    }

    .couldi {
      padding: .31rem;
      color: #eafeff;
      line-height: 1;
      font-weight: 400;
      font-size: 1rem;
      font-family: 'Roboto Slab';
    }

/*  ━  ━  ━  ━  ━  ━  ━  ━  */
/* just style the differences using an extra class*/
    .cal {
      font-family: 'calistoga'
    }

    .chi {
      font-family: 'chicle'
    }

    .cou7 {
      font-family: 'courier prime', monospace;
      font-weight: 700;
    }

    .cre {
      font-family: 'crete round'
    }

    .fira4 {
      font-family: 'fira sans condensed', sans-serif;
      font-weight: 400;
    }

    .firab {
      font-family: 'fira sans condensed', sans-serif;
      font-weight: 800;
    }

    .firx4 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 400;
    }

    .firx5 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 500;
    }

    .firx6 {
      font-family: 'fira sans extra condensed', sans-serif;
      line-height: 1;
      font-weight: 600;
    }

    .firx7 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 700;
    }

    .hen {
      font-family: 'henny penny';
      line-height: 1.5;
    }

    .met {
      font-family: 'metal mania'
    }

    .new {
      font-family: 'new rocker'
    }

    .rib {
      font-family: 'ribeye marrow';
      line-height: 1.2;
    }

    .rob {
      font-family: 'roboto slab'
    }

    .rob7 {
      font-family: 'roboto slab';
      font-weight: 700;
    }

    .san {
      font-family: 'sancreek'
    }

    .sol {
      font-family: 'solway';
      padding: .31rem;
    }

    .spe {
      font-family: 'special elite';
      padding: .44rem;
    }

    .unc {
      font-family: 'uncial antiqua'
    }

    .vas {
      font-family: 'vast shadow'
    }

    .dip {
      line-height: 1;
      font-weight: 500;
      font-size: .75rem;
      font-family: 'diplomata';
    }

    .blu {
      color: blue
    }

    .crim {
      color: crimson
    }

    .crimb {
      color: crimson;
      font-weight: bold;
    }

    .crimu {
      color: crimson;
      text-decoration: underline;
    }

    .ctext {
      color: cyan
    }

    .dblu {
      color: dodgerblue
    }

    .undr {
      text-decoration: underline
    }

    .hilite1 {
      color: #ffffdd
    }

    /*  used w/ */
    .hilite2 {
      color: #ffffcc
    }

    /*  use for text striping */
    .ytext {
      color: #ffff80
    }

    /*  use for text on black bkg. */
    /*  #ffff80 is the boldest yellow (of my set). */
    .boldly {
      font-weight: bold
    }

    .plainly {
      font-weight: normal
    }
/*  ━  ━  ━  ━  ━  ━  ━  ━  */
    .hfontk,
    .hfontc,
    .hfonty,
    .hfontw {
      text-align: center;
      line-height: 1;
      font-weight: 700;
      font-size: 1rem;
      font-family: 'roboto slab';
    }
    .hfontk {
      color: black
    }
    .hfontc {
      color: cyan
    }
    .hfonty {
      color: #ffff80
    }
    .hfontw {
      color: white
    }

    .subheader {
      color: cyan;
      text-align: center;
      background: white; /* was black */
      border-left: 8px groove cyan;
      border-right: 8px groove cyan;
      line-height: 1;
      font-weight: 400;
      font-size: 1.5rem;
      font-family: 'vast shadow';
      padding: .5rem; /* added */
    }

    /* new */
    .subheader * { 
    background-color: black;
    padding: .5rem;
    }

    .subheader+.crate .item:first-child {
      border-top: 2px solid #000;
    }  

</style>
</head>

<body>
  <div class="crate header">
    <div class="colaheader hfontc"><div>
  <br><br><br><br><br>INQUIT,<br> 
   NON SATISFACIT?</div></div>

    <div class="colbheader hfontw"><div>EPICURI DIEM NATALEM, QUAM <br>ILLIUS TESTAMENTO<br>
      <span class="hfontc">CAVERE UT</span> <span class="hfonty">AGERETUR</span></div>
    </div>

  </div> <!-- closing crate -->

<!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item rob7" style="border-top: 0">
        This is a sample of the (bolded) Google Font &ldquo;Roboto Slab,&rdquo; a handsome serif that plays nice with other fonts
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item cal" style="border-top: 0">
        This is a sample of &ldquo;Calistoga,&rdquo; a nice thick serif with fat dots on its lowercase i letter
      </div>

      <div class="item chi">
        This is a sample of &ldquo;Chicle,&rdquo; a GROOVY font popularized in posters of Peter Max and others in the 1960&rsquo;s &ldquo;flower power,&rdquo; LSD, long hair, Go Go Boots, bell bottoms, and all things psychedelic baby, you dig? Or as Jimi would ask: Are you experienced?
      </div>

      <div class="item cre">
        This is a sample of the Google Font <b>&ldquo;Crete Round&rdquo;</b> &ndash; <i>shown here italicized</i>

      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

<!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item cou7">
        This is a sample of the (bolded) Google Font &ldquo;Courier Prime&rdquo; &ndash; a Monospace font developed by Mozilla!
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item dip">
        This is a sample of the Google Font &ldquo;DIPLOMATA&rdquo; &ndash; a formal display font used to emphasize authority and stability; found in banks &amp; financial institutions and on specie
    </div>

    <div class="item firx6">
        This is a sample of the (600 weight) Google Font &ldquo;Fira Sans Extra Condensed.&rdquo; <span class="firx4">
          And here it is in what I consider a reasonably <i>normal</i> weight (400). The Fira font family <i>pulls heavy</i> so you&rsquo;ll need to get into really small numbers to render her normal. The 500 weight was too close to 600 to differentiate.</span>
    </div>

    <div class="item hen">
        This is a sample of the Google Font &ldquo;Henny Penny&rdquo; &ndash; <b>a playful display font</b> by font developer &ldquo;brownfox&rdquo;

      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

<!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="subheader">
      <div>MONKEY BUSINESS</div>
    </div>

<!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item met">
        This is a sample of the Google Font &ldquo;Metal Mania&rdquo; &ndash; a Gothic font rendered in small caps, particularly suited to <b>SHAKESPEARE EXCERPTS</b> I have found.
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item new">
        This is a sample of the Google Font &ldquo;New Rocker,&rdquo; a Gothic&#47;Black font with an impish sense of humor and a surprisingly readable clarity; well crafted!
      </div>

      <div class="item rib">
        This is a sample of the Google Font &ldquo;Ribeye Marrow,&rdquo; <b>a playful display font</b> used heavily in 1930s Greeting Cards.<br> By font developer Astigmatic
      </div>

      <div class="item san">
        This is a sample of &ldquo;Sancreek,&rdquo; a highly singular font associated with (US) &ldquo;Wild West&rdquo; posters of the era, Circuses and Saloons
      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

<!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item spe">
        <b>This is a sample of &ldquo;Special Elite.&rdquo; This is a distressed manual Typewriter</b>, frequently associated with the brands Underwood® and Royal®, <b>subjected to hourly abuse at the hands of its owner,</b> and powerless to give aid to its ribbon, struggling in a cloud of carcinogenic fumes and overflowing ashtrays
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item unc">
        This is a sample of &ldquo;Uncial Antiqua,&rdquo; &mdash; very Celtic and very, <b>very</b> old
      </div>

      <div class="item vas">
        This is a sample of &ldquo;Vast Shadow,&rdquo; with a nice little 3d effect
      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

<!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="subheader">
    <div>OLLY OLLY OXEN FREE</div>
  </div>

<!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item rob7">
        &ldquo;Roboto Slab,&rdquo; a handsome serif that plays nice with other fonts
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item cou7">
        This is a sample of the (bolded) Google Font &ldquo;Courier Prime&rdquo; &ndash; a Monospace font developed by Mozilla!

      </div>

      <div class="item sol">
        This is a sample of <b>&ldquo;Solway,&rdquo;</b> a gentle serif with rounded tips
      </div>

      <div class="item spe">
        <b>This is a sample of &ldquo;Special Elite.&rdquo; This is a distressed manual Typewriter</b>, frequently associated with the brands Underwood® and Royal®, <b>subjected to hourly abuse at the hands of its owner,</b> and powerless to give aid to its ribbon, struggling in a cloud of carcinogenic fumes

      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

</body>
</html>

There is no continuous logic to the number of items in each row or the headers so you can’t really do it automatically…

You have three items in most of the rows but only two items in one of the rows and headers interspersed randomly also.

Also the items are not direct children so the nth:child selector starts afresh at every row hence why you get two white cells together. The only way to get automatic striping would be to completely redesign it using grid so that all .item elements are all stacked together as siblings. However even that may be too complicated as you have other heading rows mixed in place.

The best you could do at the moment is this:

.colb .item:nth-child(odd){background-color: white; }
.colb .item:nth-child(even){background-color: #ffffcc; }
.crate:nth-child(even) .colb .item:nth-child(odd){background-color: #ffffcc;}
.crate:nth-child(even) .colb .item:nth-child(even){background-color: #fff;}

However it will fail at the headings but work for consecutive items.

If you need it to be exact then it could be done by manually adding classes to each item so that you color them yellow or white but you’d have to keep track of that yourself and the classes as required. If that’s acceptable then just add a class for all the yellow rows manually and use that class to style them.

Here it is with classes added.

1 Like

Paul, the first one is more than sufficient for my needs. It looks great! Thank you! I noticed two things I want to ask you about:

The first thing has to do with .cola’s header. My use of all of the <br>s to seat the content at the bottom must surely have a flexy way of doing it that doesn’t look so sophomoric shouldn’t it? Is there a flexy way of seating it at the bottom?

And I just noticed parts of my borders are missing! On rows 2-5. Do I have to add these inline? Thank you Paul. :weee:

Yes you can do it with flex like this.

 <div class="colaheader hfontc">
      <div>
        INQUIT,<br>
        NON SATISFACIT?
      </div>
    </div>

Then add this css after the original styles:

    .colaheader {
      min-height: 130px;
    }

    .colaheader div {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
    }

I’m not sure what I’m looking for as I don’t really see what’s missing :slight_smile:

What should it look like?

1 Like

They’re missing parts of their borders. :face_with_monocle: And I just noticed the last few words of the very last cell in .colb are missing tsk. Do you see that? Re the ashtray . . .

I loved this:

    .hfontk,
    .hfontc,
    .hfonty,
    .hfontw {
      text-align: center;
      line-height: 1;
      font-weight: 700;
      font-size: 1rem;
      font-family: 'roboto slab';

Sorry, I have no idea which borders you mean. I’ll need a screenshot or a more specific set of instructions to find what you mean. I don’t notice any borders missing as such.

Nope I can’t see that either lol :slight_smile:

The word ‘ashtray’ only appears in colA and only one and is displayed correctly

1 Like

I’m cracking up lol. :woozy_face: I’ll post a screenshot.

Please click this link and tell me if you see the borders missing pieces in rows 5-8 (th is a row). I have tried this in two different browsers and they both have this issue Paul. I assure you I’m not making it up.

Should I just add them :nauseated_face: inline?

Ok, I can see it now but I have to squash the browser window small before it happens. It looks like the row is wrapping because the text is too wide and doesn’t break mid-word.

Try changing these two rules as follows:

    .cola {
      flex: 1 0 55%;
      max-width:55%;
      word-wrap:break-word;
      border-left: 8px groove cyan;
      border-right: 1px solid #000;
    }

    .colb {
      flex: 1 0 45%;
      max-width:45%;
      word-wrap:break-word;
      border-right: 8px groove cyan;
      border-left: 1px solid #000;
    }
1 Like

No I’m afraid that does no good. Could it be I just have too much going on in this page? That it’s a bug? Because there is plenty of room and ample space to break on any of over a dozen points. :roll_eyes:

I hate to say this but it’s possible this many different fonts aren’t playing well together . . . ?

You must have missed something as my codepen does not suffer from the problem.

Or do you see the problem there also :slight_smile:

1 Like

Yaaay! Gotcha! I dropped your most recent codepen in and it works. Thank you Paul. It looks GREAT! I note those extra rows were removed but I still like it. :tongue:

Okay Paul. All I did was add another row identical to the row just above OLLY OLLY OXEN FREE and carefully replace the font names with three more I wanted listed after creating their styles (Playfair and the 2 Londrinas). Oh and i removed the duplicate Special Elite which I couldn’t see any border data associated with it so I presumed was safe to remove.

Disaster. Not only did it throw the alignment of the first line on cola off it ate my bottom border. Really Paul, is flex so finicky that it can’t survive copying the identical structure of data, now populated with 3 different fonts carefully added? I copied over Special Elite, Uncial and Vast Shadow — which should have been a clean duplication of 3 fonts on their own row . . for 3 fonts on their own row. I have to be able to edit it sigh. I can’t believe I broke the page. Here it is again . . .

<!DOCTYPE HTML>
<HTML LANG="EN">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Calistoga&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Chicle&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Crete+Round:ital@0;1&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Diplomata&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,100;&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Henny+Penny&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Londrina+Outline&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Londrina+Solid:wght@100;300;400;900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Metal+Mania&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=New+Rocker&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Ribeye+Marrow&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Sancreek&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Solway:wght@300;400;500;700;800&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Special+Elite&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Uncial+Antiqua&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Vast+Shadow&display=swap" rel="stylesheet">

  <title>2 FLEX COLUMNS w&#47;nth Child STRIPING &#9743; Courtesy Paul O&rsquo;Brien of Sitepoint Forums</title>

  <style>
    /* lets use border box model so padding and borders are included inwidth*/
    html {
      box-sizing: border-box;
    }

    *,
    *:before,
    *:after {
      box-sizing: inherit;
    }

    /*lower case for selectors please */
    html,
    body {
      margin: 0;
      padding: 0;
    }

#counter {
    margin-top: 2.5rem;
    text-align: center;
    position: absolute;
    bottom: 0;
    max-width: 100%;
}
    p {
      margin: 0 0 1rem;
    }

    body {
      margin: .75rem 3% 2rem 3%;
      font-size: 1rem;
      line-height: 1;
      font-weight: 700;
      font-family: "Roboto Slab", sans-serif;
    }

.crate {
      display: flex;
      flex-wrap: wrap;
      margin: 0 auto;
    }

    .crate:first-of-type {
      /*  REMOVED    border-top: 8px groove cyan;   */
    }

    .crate:last-of-type {
      border-bottom: 8px groove cyan;
    }

    .colb .item:nth-child(odd) {
      background-color: white;
    }

    .colb .item:nth-child(even) {
      background-color: #ffffcc;
    }

    .crate:nth-child(even) .colb .item:nth-child(odd) {
      background-color: #ffffcc;
    }

    .crate:nth-child(even) .colb .item:nth-child(even) {
      background-color: #fff;
    }

    /* colors */
    .cola .item {
      background: #eafeff;
    }

    .header {
      margin: 0;
      display: flex;
      flex: 1 0 100%;
      min-width: 0;
      line-height: 1;
      font-weight: 700;
      font-size: 1rem;
      font-family: 'roboto slab';
      border: 8px groove cyan;
      /* REMOVED since I placed groove on the ENTIRE header border-top: 8px groove cyan;   */
    }

    .crate.header+.crate .item:first-child {
      border-top: 2px solid #000;
    }

    .colaheader,
    .colbheader {
      display: flex;
      flex-direction: column;
      margin: 0;
      min-width: 0;
      font-size: 1rem;
      text-align: center;
      text-shadow: 2px 2px #000;
      padding: .5rem;
      /* tweaked */
      background: #fff;
      /* was black */
    }

    /* new */
    .colaheader div,
    .colbheader div {
      background: #000;
      padding: .5rem;
      height: 100%;
    }

    .colaheader {
      flex: 1 0 54.4%;
      position: relative;
      justify-content: flex-end;
    }

    .colaheader {
      min-height: 130px;
    }

    .colaheader div {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
    }

    .colbheader {
      flex: 1 0 45%;
    }

    .colaheader+.colbheader {
      /*  how clever Dave!  */
      border-left: 8px groove cyan;
    }

    .colbheader {
      flex: 1 0 45%;
    }

    .crate.header:has(.colaheader + .colbheader)+.crate .item:first-child {
      border-top: 0px;
    }

    .cola {
      flex: 1 0 55%;
      max-width: 55%;
      word-wrap: break-word;
      border-left: 8px groove cyan;
      border-right: 1px solid #000;
    }

    .colb {
      flex: 1 0 45%;
      max-width: 45%;
      word-wrap: break-word;
      border-right: 8px groove cyan;
      border-left: 1px solid #000;
    }

    .cola,
    .colb {
      display: flex;
      flex-direction: column;
    }

    .item {
      line-height: 1;
      font-weight: 400;
      font-size: 1rem;
      padding: .31rem;
      border-bottom: 2px solid black;
      flex: 1 0 0;
      background: #ffffcc;
    }

    .crate:last-of-type .item:last-child {
      border-bottom: none;
    }

    .couldi {
      padding: .31rem;
      color: #eafeff;
      line-height: 1;
      font-weight: 400;
      font-size: 1rem;
      font-family: 'Roboto Slab';
    }

    /*  ━  ━  ━  ━  ━  ━  ━  ━  */
    /* just style the differences using an extra class*/
    .cal {
      font-family: 'calistoga'
    }

    .chi {
      font-family: 'chicle'
    }

    .cou7 {
      font-family: 'courier prime', monospace;
      font-weight: 700;
    }

    .cre {
      font-family: 'crete round'
    }

    .fira4 {
      font-family: 'fira sans condensed', sans-serif;
      font-weight: 400;
    }

    .firab {
      font-family: 'fira sans condensed', sans-serif;
      font-weight: 800;
    }

    .firx4 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 400;
    }

    .firx5 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 500;
    }

    .firx6 {
      font-family: 'fira sans extra condensed', sans-serif;
      line-height: 1;
      font-weight: 600;
    }

    .firx7 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 700;
    }

    .lono {
      font-family: 'londrina outline';
      line-height: 1.2;
    }

    .lons {
      font-family: 'londrina solid';
      line-height: 1.2;
    }

    .hen {
      font-family: 'henny penny';
      line-height: 1.5;
    }

    .met {
      font-family: 'metal mania'
    }

    .new {
      font-family: 'new rocker'
    }

    .pla {
      font-family: 'playfair display';
      line-height: 1.2;
    }

    .rib {
      font-family: 'ribeye marrow';
      line-height: 1.2;
    }

    .rob {
      font-family: 'roboto slab'
    }

    .rob7 {
      font-family: 'roboto slab';
      font-weight: 700;
    }

    .san {
      font-family: 'sancreek'
    }

    .sol {
      font-family: 'solway';
      padding: .31rem;
    }

    .spe {
      font-family: 'special elite';
      padding: .44rem;
    }

    .unc {
      font-family: 'uncial antiqua'
    }

    .vas {
      font-family: 'vast shadow'
    }

    .dip {
      line-height: 1;
      font-weight: 500;
      font-size: .75rem;
      font-family: 'diplomata';
    }

    .blu {
      color: blue
    }

    .crim {
      color: crimson
    }

    .crimb {
      color: crimson;
      font-weight: bold;
    }

    .crimu {
      color: crimson;
      text-decoration: underline;
    }

    .ctext {
      color: cyan
    }

    .dblu {
      color: dodgerblue
    }

    .undr {
      text-decoration: underline
    }

    .hilite1 {
      color: #ffffdd
    }

    /*  used w/ */
    .hilite2 {
      color: #ffffcc
    }

    /*  use for text striping */
    .ytext {
      color: #ffff80
    }

    /*  use for text on black bkg. */
    /*  #ffff80 is the boldest yellow (of my set). */
    .boldly {
      font-weight: bold
    }

    .plainly {
      font-weight: normal
    }

    /*  ━  ━  ━  ━  ━  ━  ━  ━  */
    .hfontk,
    .hfontc,
    .hfonty,
    .hfontw {
      text-align: center;
      line-height: 1;
      font-weight: 700;
      font-size: 1rem;
      font-family: 'roboto slab';
    }

    .hfontk {
      color: black
    }

    .hfontc {
      color: cyan
    }

    .hfonty {
      color: #ffff80
    }

    .hfontw {
      color: white
    }

    .subheader {
      color: cyan;
      text-align: center;
      background: white;
      /* was black */
      border-left: 8px groove cyan;
      border-right: 8px groove cyan;
      line-height: 1;
      font-weight: 400;
      font-size: 1.5rem;
      font-family: 'vast shadow';
      padding: .5rem;
      /* added */
    }

    /* new */
    .subheader * {
      background-color: black;
      padding: .5rem;
    }

    .subheader+.crate .item:first-child {
      border-top: 2px solid #000;
    }
.labela {
    color: black;
    text-align: center;
    margin: 1rem 0 1.75rem 0;
    font-size: 2.25rem;
    line-height: 1.02;
    font-weight: 700;
    font-family: 'roboto slab', serif;
}
.labelb {
    text-align: center;
    font-family: 'courier prime', monospace;
    font-size: 0.75rem;
    line-height: 1.02;
    font-weight: bold;
    color: #888888;
}
.labelc {
    text-align: center;
    font-family: 'courier prime', monospace;
    font-size: 0.75rem;
    line-height: 1.02;
    font-weight: bold;
    color: black;
}
a:active {color: teal}
a:hover {color: crimson}
a:link {color: teal}
a:visited {color: black}


  </style>
</head>

<body>
  <div class="crate header">
    <div class="colaheader hfontc">
      <div>
        INQUIT,<br>
        NON SATISFACIT?
      </div>
    </div>

    <div class="colbheader hfontw">
      <div>EPICURI DIEM NATALEM, QUAM <br>ILLIUS TESTAMENTO<br>
        <span class="hfontc">CAVERE UT</span> <span class="hfonty">AGERETUR</span>
      </div>
    </div>

  </div> <!-- closing crate -->

  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item rob7" style="border-top: 0">
        This is a sample of the (bolded) Google Font &ldquo;Roboto Slab,&rdquo; a handsome serif that plays nice with other fonts
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item cal" style="border-top: 0">
        This is a sample of &ldquo;Calistoga,&rdquo; a nice thick serif with fat dots on its lowercase i letter
      </div>

      <div class="item chi">
        This is a sample of &ldquo;Chicle,&rdquo; a GROOVY font popularized in posters of Peter Max and others in the 1960&rsquo;s &ldquo;flower power,&rdquo; LSD, long hair, Go Go Boots, bell bottoms, and all things psychedelic baby, you dig? Or as Jimi would ask: Are you experienced?
      </div>

      <div class="item cre">
        This is a sample of the Google Font <b>&ldquo;Crete Round&rdquo;</b> &ndash; <i>shown here italicized</i>

      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item cou7">
        This is a sample of the (bolded) Google Font &ldquo;Courier Prime&rdquo; &ndash; a Monospace font developed by Mozilla!
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item dip">
        This is a sample of the Google Font &ldquo;DIPLOMATA&rdquo; &ndash; a formal display font used to emphasize authority and stability; found in banks &amp; financial institutions and on specie
      </div>

      <div class="item firx6">
        This is a sample of the (600 weight) Google Font &ldquo;Fira Sans Extra Condensed.&rdquo; <span class="firx4">
          And here it is in what I consider a reasonably <i>normal</i> weight (400). The Fira font family <i>pulls heavy</i> so you&rsquo;ll need to get into really small numbers to render her normal. The 500 weight was too close to 600 to differentiate.</span>
      </div>

      <div class="item hen">
        This is a sample of the Google Font &ldquo;Henny Penny&rdquo; &ndash; <b>a playful display font</b> by font developer &ldquo;brownfox&rdquo;

      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="subheader">
    <div>MONKEY BUSINESS</div>
  </div>

  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item met">
        This is a sample of the Google Font &ldquo;Metal Mania&rdquo; &ndash; a Gothic font rendered in small caps, particularly suited to <b>SHAKESPEARE EXCERPTS</b> I have found.
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item new">
        This is a sample of the Google Font &ldquo;New Rocker,&rdquo; a Gothic&#47;Black font with an impish sense of humor and a surprisingly readable clarity; well crafted!
      </div>

      <div class="item rib">
        This is a sample of the Google Font &ldquo;Ribeye Marrow,&rdquo; <b>a playful display font</b> used heavily in 1930s Greeting Cards.<br> By font developer Astigmatic
      </div>

      <div class="item san">
        This is a sample of &ldquo;Sancreek,&rdquo; a highly singular font associated with (US) &ldquo;Wild West&rdquo; posters of the era, Circuses and Saloons
      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item spe">
        <b>This is a sample of &ldquo;Special Elite.&rdquo; This is a distressed manual Typewriter</b>, frequently associated with the brands Underwood® and Royal®, <b>subjected to hourly abuse at the hands of its owner,</b> and powerless to give aid to its ribbon, struggling in a cloud of carcinogenic fumes and overflowing ashtrays
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item unc">
        This is a sample of &ldquo;Uncial Antiqua,&rdquo; &mdash; very Celtic and very, <b>very</b> old
      </div>

      <div class="item vas">
        This is a sample of &ldquo;Vast Shadow,&rdquo; with a nice little 3d effect
      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="subheader">
    <div>OLLY OLLY OXEN FREE</div>
  </div>

  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item pla">
        <b>This is a sample of &ldquo;Playfair Display.&rdquo; This is an elegant serif from Claus Eggers Sørensen with a particularly lovely ampersand <span style="font-size: 2rem">&</span>.</b>
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item lono">
        <b>This is a sample of &ldquo;Londrina Outline,&rdquo; &mdash; the companion outline font to Londrina Solid &mdash; a playful font</b>
      </div>

      <div class="lons">
        This is a sample of &ldquo;Londrina Solid,&rdquo; with total caveman vibes
      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

  <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
  <div class="crate">
    <div class="cola">
      <div class="item rob7">
        &ldquo;Roboto Slab,&rdquo; a handsome serif that plays nice with other fonts
      </div> <!-- closing style -->
    </div> <!-- closing cola -->

    <div class="colb">
      <div class="item cou7">
        This is a sample of the (bolded) Google Font &ldquo;Courier Prime&rdquo; &ndash; a Monospace font developed by Mozilla!

      </div>

      <div class="item sol">
        This is a sample of <b>&ldquo;Solway,&rdquo;</b> a gentle serif with rounded tips
      </div>

      </div> <!-- closing style -->
    </div> <!-- closing colb -->
  </div> <!-- closing crate -->

<div class="labela">
<a href="https://semicodin.nekoweb.org/VAULT/2_FLEX_COLUMNS_w_nth_CHILD_01.ZIP" target="_blank">Code here.</a>
<div class="labelc"><br>
This code courtesy of Paul O&rsquo;Brien<br>
at the Sitepoint Forums
</div>

<div id="counter">
<!-- Histats.com  (div with counter) --><div id="histats_counter"></div>
<!-- Histats.com  START  (aync)-->
<script type="text/javascript">var _Hasync= _Hasync|| [];
_Hasync.push(['Histats.start', '1,4873848,4,430,112,75,00011111']);
_Hasync.push(['Histats.fasi', '1']);
_Hasync.push(['Histats.track_hits', '']);
(function() {
var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
hs.src = ('//s10.histats.com/js15_as.js');
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
})();</script>
<noscript><a href="/" target="_blank"><img  src="//sstatic1.histats.com/0.gif?4873848&101" alt="free hit counter" border="0"></a></noscript>
<!-- Histats.com  END  -->
</div>
</body>
</html>

lol don’t blame flex for your copy and paste errors. :). You have mismatched tags.

I’m on a mobile at the moment so won’t post code until I get back but you should be able to spot the problem yourself.

You also have the counter still at position absolute so it’s sitting over something else. Remove the position absolute.

You have an extra closing div here that is not needed. the one called </div> <!-- closing style --> is superfluous as there is a closing div before it

    </div> <!-- closing style -->
  </div> <!-- closing colb -->
  </div> <!-- closing crate -->

  <div class="labela">

You are also missing a closing div with your new .labela code and there should be a closing div at the end just before the closing body tag.

Your bottom border is supplied by this rule:

.crate:last-of-type {
    border-bottom: 8px groove cyan;
}

However you went and added another div at the same level after your last crate so the last of type is now this element.

 <div class="labela">
    <a href="https://semicodin.nekoweb.org/VAULT/2_FLEX_COLUMNS_w_nth_CHILD_01.ZIP" target="_blank">Code here.</a>
etc...

That element is now the last of type in that section and as it does not have the class of crate it gets no border.

In order for you not to make this mistake again I suggest that you add a wrapper to all the crates and then the last crate will always be last-of-type in that section.

I’ve added the wrapper in this codepen and fixed your missing and duplicated tags.

<!DOCTYPE HTML>
<HTML LANG="EN">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Calistoga&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Chicle&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Crete+Round:ital@0;1&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Diplomata&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,100;&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Henny+Penny&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Londrina+Outline&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Londrina+Solid:wght@100;300;400;900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Metal+Mania&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=New+Rocker&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Ribeye+Marrow&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Sancreek&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Solway:wght@300;400;500;700;800&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Special+Elite&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Uncial+Antiqua&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Vast+Shadow&display=swap" rel="stylesheet">

  <title>2 FLEX COLUMNS w&#47;nth Child STRIPING &#9743; Courtesy Paul O&rsquo;Brien of Sitepoint Forums</title>

  <style>
    /* lets use border box model so padding and borders are included inwidth*/
    html {
      box-sizing: border-box;
    }

    *,
    *:before,
    *:after {
      box-sizing: inherit;
    }

    /*lower case for selectors please */
    html,
    body {
      margin: 0;
      padding: 0;
    }

    #counter {
      margin-top: 2.5rem;
      text-align: center;
      /*position: absolute;*/
      bottom: 0;
      max-width: 100%;
    }

    p {
      margin: 0 0 1rem;
    }

    body {
      margin: .75rem 3% 2rem 3%;
      font-size: 1rem;
      line-height: 1;
      font-weight: 700;
      font-family: "Roboto Slab", sans-serif;
    }

    .crate {
      display: flex;
      flex-wrap: wrap;
      margin: 0 auto;
    }

    .crate:first-of-type {
      /*  REMOVED    border-top: 8px groove cyan;   */
    }

    .crate:last-of-type {
      border-bottom: 8px groove cyan;
    }

    .colb .item:nth-child(odd) {
      background-color: white;
    }

    .colb .item:nth-child(even) {
      background-color: #ffffcc;
    }

    .crate:nth-child(even) .colb .item:nth-child(odd) {
      background-color: #ffffcc;
    }

    .crate:nth-child(even) .colb .item:nth-child(even) {
      background-color: #fff;
    }

    /* colors */
    .cola .item {
      background: #eafeff;
    }

    .header {
      margin: 0;
      display: flex;
      flex: 1 0 100%;
      min-width: 0;
      line-height: 1;
      font-weight: 700;
      font-size: 1rem;
      font-family: 'roboto slab';
      border: 8px groove cyan;
      /* REMOVED since I placed groove on the ENTIRE header border-top: 8px groove cyan;   */
    }

    .crate.header+.crate .item:first-child {
      border-top: 2px solid #000;
    }

    .colaheader,
    .colbheader {
      display: flex;
      flex-direction: column;
      margin: 0;
      min-width: 0;
      font-size: 1rem;
      text-align: center;
      text-shadow: 2px 2px #000;
      padding: .5rem;
      /* tweaked */
      background: #fff;
      /* was black */
    }

    /* new */
    .colaheader div,
    .colbheader div {
      background: #000;
      padding: .5rem;
      height: 100%;
    }

    .colaheader {
      flex: 1 0 54.4%;
      position: relative;
      justify-content: flex-end;
    }

    .colaheader {
      min-height: 130px;
    }

    .colaheader div {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
    }

    .colbheader {
      flex: 1 0 45%;
    }

    .colaheader+.colbheader {
      /*  how clever Dave!  */
      border-left: 8px groove cyan;
    }

    .colbheader {
      flex: 1 0 45%;
    }

    .crate.header:has(.colaheader + .colbheader)+.crate .item:first-child {
      border-top: 0px;
    }

    .cola {
      flex: 1 0 55%;
      max-width: 55%;
      word-wrap: break-word;
      border-left: 8px groove cyan;
      border-right: 1px solid #000;
    }

    .colb {
      flex: 1 0 45%;
      max-width: 45%;
      word-wrap: break-word;
      border-right: 8px groove cyan;
      border-left: 1px solid #000;
    }

    .cola,
    .colb {
      display: flex;
      flex-direction: column;
    }

    .item {
      line-height: 1;
      font-weight: 400;
      font-size: 1rem;
      padding: .31rem;
      border-bottom: 2px solid black;
      flex: 1 0 0;
      background: #ffffcc;
    }

    .crate:last-of-type .item:last-child {
      border-bottom: none;
    }

    .couldi {
      padding: .31rem;
      color: #eafeff;
      line-height: 1;
      font-weight: 400;
      font-size: 1rem;
      font-family: 'Roboto Slab';
    }

    /*  ━  ━  ━  ━  ━  ━  ━  ━  */
    /* just style the differences using an extra class*/
    .cal {
      font-family: 'calistoga'
    }

    .chi {
      font-family: 'chicle'
    }

    .cou7 {
      font-family: 'courier prime', monospace;
      font-weight: 700;
    }

    .cre {
      font-family: 'crete round'
    }

    .fira4 {
      font-family: 'fira sans condensed', sans-serif;
      font-weight: 400;
    }

    .firab {
      font-family: 'fira sans condensed', sans-serif;
      font-weight: 800;
    }

    .firx4 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 400;
    }

    .firx5 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 500;
    }

    .firx6 {
      font-family: 'fira sans extra condensed', sans-serif;
      line-height: 1;
      font-weight: 600;
    }

    .firx7 {
      font-family: 'fira sans extra condensed', sans-serif;
      font-weight: 700;
    }

    .lono {
      font-family: 'londrina outline';
      line-height: 1.2;
    }

    .lons {
      font-family: 'londrina solid';
      line-height: 1.2;
    }

    .hen {
      font-family: 'henny penny';
      line-height: 1.5;
    }

    .met {
      font-family: 'metal mania'
    }

    .new {
      font-family: 'new rocker'
    }

    .pla {
      font-family: 'playfair display';
      line-height: 1.2;
    }

    .rib {
      font-family: 'ribeye marrow';
      line-height: 1.2;
    }

    .rob {
      font-family: 'roboto slab'
    }

    .rob7 {
      font-family: 'roboto slab';
      font-weight: 700;
    }

    .san {
      font-family: 'sancreek'
    }

    .sol {
      font-family: 'solway';
      padding: .31rem;
    }

    .spe {
      font-family: 'special elite';
      padding: .44rem;
    }

    .unc {
      font-family: 'uncial antiqua'
    }

    .vas {
      font-family: 'vast shadow'
    }

    .dip {
      line-height: 1;
      font-weight: 500;
      font-size: .75rem;
      font-family: 'diplomata';
    }

    .blu {
      color: blue
    }

    .crim {
      color: crimson
    }

    .crimb {
      color: crimson;
      font-weight: bold;
    }

    .crimu {
      color: crimson;
      text-decoration: underline;
    }

    .ctext {
      color: cyan
    }

    .dblu {
      color: dodgerblue
    }

    .undr {
      text-decoration: underline
    }

    .hilite1 {
      color: #ffffdd
    }

    /*  used w/ */
    .hilite2 {
      color: #ffffcc
    }

    /*  use for text striping */
    .ytext {
      color: #ffff80
    }

    /*  use for text on black bkg. */
    /*  #ffff80 is the boldest yellow (of my set). */
    .boldly {
      font-weight: bold
    }

    .plainly {
      font-weight: normal
    }

    /*  ━  ━  ━  ━  ━  ━  ━  ━  */
    .hfontk,
    .hfontc,
    .hfonty,
    .hfontw {
      text-align: center;
      line-height: 1;
      font-weight: 700;
      font-size: 1rem;
      font-family: 'roboto slab';
    }

    .hfontk {
      color: black
    }

    .hfontc {
      color: cyan
    }

    .hfonty {
      color: #ffff80
    }

    .hfontw {
      color: white
    }

    .subheader {
      color: cyan;
      text-align: center;
      background: white;
      /* was black */
      border-left: 8px groove cyan;
      border-right: 8px groove cyan;
      line-height: 1;
      font-weight: 400;
      font-size: 1.5rem;
      font-family: 'vast shadow';
      padding: .5rem;
      /* added */
    }

    /* new */
    .subheader * {
      background-color: black;
      padding: .5rem;
    }

    .subheader+.crate .item:first-child {
      border-top: 2px solid #000;
    }

    .labela {
      color: black;
      text-align: center;
      margin: 1rem 0 1.75rem 0;
      font-size: 2.25rem;
      line-height: 1.02;
      font-weight: 700;
      font-family: 'roboto slab', serif;
    }

    .labelb {
      text-align: center;
      font-family: 'courier prime', monospace;
      font-size: 0.75rem;
      line-height: 1.02;
      font-weight: bold;
      color: #888888;
    }

    .labelc {
      text-align: center;
      font-family: 'courier prime', monospace;
      font-size: 0.75rem;
      line-height: 1.02;
      font-weight: bold;
      color: black;
    }

    a:active {
      color: teal
    }

    a:hover {
      color: crimson
    }

    a:link {
      color: teal
    }

    a:visited {
      color: black
    }
  </style>
</head>

<body>
  <div class="crate-wrapper">
    <div class="crate header">
      <div class="colaheader hfontc">
        <div>
          INQUIT,<br>
          NON SATISFACIT?
        </div>
      </div>

      <div class="colbheader hfontw">
        <div>EPICURI DIEM NATALEM, QUAM <br>ILLIUS TESTAMENTO<br>
          <span class="hfontc">CAVERE UT</span> <span class="hfonty">AGERETUR</span>
        </div>
      </div>

    </div> <!-- closing crate -->

    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="crate">
      <div class="cola">
        <div class="item rob7" style="border-top: 0">
          This is a sample of the (bolded) Google Font &ldquo;Roboto Slab,&rdquo; a handsome serif that plays nice with other fonts
        </div> <!-- closing style -->
      </div> <!-- closing cola -->

      <div class="colb">
        <div class="item cal" style="border-top: 0">
          This is a sample of &ldquo;Calistoga,&rdquo; a nice thick serif with fat dots on its lowercase i letter
        </div>

        <div class="item chi">
          This is a sample of &ldquo;Chicle,&rdquo; a GROOVY font popularized in posters of Peter Max and others in the 1960&rsquo;s &ldquo;flower power,&rdquo; LSD, long hair, Go Go Boots, bell bottoms, and all things psychedelic baby, you dig? Or as Jimi would ask: Are you experienced?
        </div>

        <div class="item cre">
          This is a sample of the Google Font <b>&ldquo;Crete Round&rdquo;</b> &ndash; <i>shown here italicized</i>

        </div> <!-- closing style -->
      </div> <!-- closing colb -->
    </div> <!-- closing crate -->

    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="crate">
      <div class="cola">
        <div class="item cou7">
          This is a sample of the (bolded) Google Font &ldquo;Courier Prime&rdquo; &ndash; a Monospace font developed by Mozilla!
        </div> <!-- closing style -->
      </div> <!-- closing cola -->

      <div class="colb">
        <div class="item dip">
          This is a sample of the Google Font &ldquo;DIPLOMATA&rdquo; &ndash; a formal display font used to emphasize authority and stability; found in banks &amp; financial institutions and on specie
        </div>

        <div class="item firx6">
          This is a sample of the (600 weight) Google Font &ldquo;Fira Sans Extra Condensed.&rdquo; <span class="firx4">
            And here it is in what I consider a reasonably <i>normal</i> weight (400). The Fira font family <i>pulls heavy</i> so you&rsquo;ll need to get into really small numbers to render her normal. The 500 weight was too close to 600 to differentiate.</span>
        </div>

        <div class="item hen">
          This is a sample of the Google Font &ldquo;Henny Penny&rdquo; &ndash; <b>a playful display font</b> by font developer &ldquo;brownfox&rdquo;

        </div> <!-- closing style -->
      </div> <!-- closing colb -->
    </div> <!-- closing crate -->

    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="subheader">
      <div>MONKEY BUSINESS</div>
    </div>

    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="crate">
      <div class="cola">
        <div class="item met">
          This is a sample of the Google Font &ldquo;Metal Mania&rdquo; &ndash; a Gothic font rendered in small caps, particularly suited to <b>SHAKESPEARE EXCERPTS</b> I have found.
        </div> <!-- closing style -->
      </div> <!-- closing cola -->

      <div class="colb">
        <div class="item new">
          This is a sample of the Google Font &ldquo;New Rocker,&rdquo; a Gothic&#47;Black font with an impish sense of humor and a surprisingly readable clarity; well crafted!
        </div>

        <div class="item rib">
          This is a sample of the Google Font &ldquo;Ribeye Marrow,&rdquo; <b>a playful display font</b> used heavily in 1930s Greeting Cards.<br> By font developer Astigmatic
        </div>

        <div class="item san">
          This is a sample of &ldquo;Sancreek,&rdquo; a highly singular font associated with (US) &ldquo;Wild West&rdquo; posters of the era, Circuses and Saloons
        </div> <!-- closing style -->
      </div> <!-- closing colb -->
    </div> <!-- closing crate -->

    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="crate">
      <div class="cola">
        <div class="item spe">
          <b>This is a sample of &ldquo;Special Elite.&rdquo; This is a distressed manual Typewriter</b>, frequently associated with the brands Underwood® and Royal®, <b>subjected to hourly abuse at the hands of its owner,</b> and powerless to give aid to its ribbon, struggling in a cloud of carcinogenic fumes and overflowing ashtrays
        </div> <!-- closing style -->
      </div> <!-- closing cola -->

      <div class="colb">
        <div class="item unc">
          This is a sample of &ldquo;Uncial Antiqua,&rdquo; &mdash; very Celtic and very, <b>very</b> old
        </div>

        <div class="item vas">
          This is a sample of &ldquo;Vast Shadow,&rdquo; with a nice little 3d effect
        </div> <!-- closing style -->
      </div> <!-- closing colb -->
    </div> <!-- closing crate -->

    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="subheader">
      <div>OLLY OLLY OXEN FREE</div>
    </div>

    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="crate">
      <div class="cola">
        <div class="item pla">
          <b>This is a sample of &ldquo;Playfair Display.&rdquo; This is an elegant serif from Claus Eggers Sørensen with a particularly lovely ampersand <span style="font-size: 2rem">&</span>.</b>
        </div> <!-- closing style -->
      </div> <!-- closing cola -->

      <div class="colb">
        <div class="item lono">
          <b>This is a sample of &ldquo;Londrina Outline,&rdquo; &mdash; the companion outline font to Londrina Solid &mdash; a playful font</b>
        </div>

        <div class="lons">
          This is a sample of &ldquo;Londrina Solid,&rdquo; with total caveman vibes
        </div> <!-- closing style -->
      </div> <!-- closing colb -->
    </div> <!-- closing crate -->

    <!-- ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ -->
    <div class="crate">
      <div class="cola">
        <div class="item rob7">
          &ldquo;Roboto Slab,&rdquo; a handsome serif that plays nice with other fonts
        </div> <!-- closing style -->
      </div> <!-- closing cola -->

      <div class="colb">
        <div class="item cou7">
          This is a sample of the (bolded) Google Font &ldquo;Courier Prime&rdquo; &ndash; a Monospace font developed by Mozilla!

        </div>

        <div class="item sol">
          This is a sample of <b>&ldquo;Solway,&rdquo;</b> a gentle serif with rounded tips
        </div>

      </div> <!-- closing colb -->
    </div> <!-- closing crate -->
  </div><!-- end wrapper for all crates -->

  <div class="labela">
    <a href="https://semicodin.nekoweb.org/VAULT/2_FLEX_COLUMNS_w_nth_CHILD_01.ZIP" target="_blank">Code here.</a>
    <div class="labelc"><br>
      This code courtesy of Paul O&rsquo;Brien<br>
      at the Sitepoint Forums
    </div>

    <div id="counter">
      <!-- Histats.com  (div with counter) -->
      <div id="histats_counter"></div>
      <!-- Histats.com  START  (aync)-->
      <script type="text/javascript">
        var _Hasync = _Hasync || [];
        _Hasync.push(['Histats.start', '1,4873848,4,430,112,75,00011111']);
        _Hasync.push(['Histats.fasi', '1']);
        _Hasync.push(['Histats.track_hits', '']);
        (function() {
          var hs = document.createElement('script');
          hs.type = 'text/javascript';
          hs.async = true;
          hs.src = ('//s10.histats.com/js15_as.js');
          (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
        })();
      </script>
      <noscript><a href="/" target="_blank"><img src="//sstatic1.histats.com/0.gif?4873848&101" alt="free hit counter" border="0"></a></noscript>
      <!-- Histats.com  END  -->
    </div>
  </div>
</body>

</html>
1 Like

paul the crate is (supposed to be) my wrapper. that’s alright. i’m persuaded to never touch this again. i can’t believe how many mistakes you found sigh. thank you maestro, you are The Man. :tongue:

paul was there a reason these two were separated? can we combine them?

    .colaheader {
      flex: 1 0 54.4%;
      position: relative;
      justify-content: flex-end;
    }

    .colaheader {
      min-height: 130px;
    }
1 Like

Yes they can be combined now :slight_smile:

1 Like

Paul I’m gunshy to try this myself but there needs to be a border-top: 2px solid #000; on Courier Prime (at the bottom).

…and just like that you lost me again :slight_smile:

Can you point to the code you are talking about as there seems to be a border top here on the courier prime text.

Toward the bottom: