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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="menu">
  Our World<br/>in Data
</div>
<div class="sidebar-content">
  <div class="sidebar">
    <ul>
      <li class="subsection"><a href="#nulla">Nulla profecto est, quin suam vim retineat a primo ad extremum.</a></li>
      <li class="section"><a href="#videamus">Videamus igitur sententias eorum, tum ad verba redeamus</a></li>
      <li class="section nosubs"><a href="#how-has-global-land-use-changed-over-the-long-term">How has global land use changed over the long-term?</a></li>
      <li class="section"><a href="#agricultural-land-use-over-the-long-run">Agricultural land use over the long-run</a></li>
      <li class="subsection"><a href="#total-agricultural-land-use">Total agricultural land use</a></li>
      <li class="subsection"><a href="#cropland-use">Cropland use</a></li>
      <li class="section"><a href="#how-much-land-do-countries-use-for-agriculture">How much land do countries use for agriculture?</a></li>
      <li class="subsection"><a href="#pastureland-permanent-meadows-and-pasture">Pastureland (permanent meadows and pasture)</a></li>
      <li class="section"><a href="#cropland-use-per-person">Cropland use per person</a></li>
      <li class="subsection"><a href="#cropland-per-person-over-the-long-term">Cropland per person over the long-term</a></li>
      <li class="subsection"><a href="#cropland-use-per-person-in-the-near-term">Cropland use per person in the near-term</a></li>
      <li class="section"><a href="#agricultural-land-use-per-person">Agricultural land use per person</a></li>
      <li class="subsection"><a href="#agricultural-land-per-person-over-the-long-term">Agricultural land per person over the long-term</a></li>
      <li class="subsection"><a href="#agricultural-land-per-person-over-the-near-term">Agricultural land per person over the near-term</a></li>
      <li class="section nosubs"><a href="#land-use-by-crop">Land use by crop</a></li>
      <li class="section nosubs"><a href="#land-use-by-food-type">Land use by food type</a></li>
      <li class="section"><a href="#peak-farmland">Peak farmland</a></li>
      <li class="subsection"><a href="#land-projections-to-2050-60-have-we-reached-peak-farmland">Land projections to 2050-60: have we reached ‘peak farmland’?</a></li>
      <li class="subsection"><a href="#land-projections-to-2050-when-will-we-reach-peak-agricultural-land">Land projections to 2050: when will we reach peak agricultural land?</a></li>
      <li class="section nosubs"><a href="#what-determines-the-amount-of-arable-land-we-use">What determines the amount of arable land we use?</a></li>
      <li class="section"><a href="#definitions">Definitions</a></li>
      <li class="subsection"><a href="#land-use-categories">Land use categories</a></li>
      <li class="subsection"><a href="#definitions-of-agricultural-land-use">Definitions of agricultural land use</a></li>
      <li class="section nosubs"><a href="#data-sources">Data Sources</a></li>
      <li class="section nosubs"><a href="#references">References</a></li>
      <li class="section nosubs"><a href="#citation">Citation</a></li>
    </ul>
  </div>
  <div class="content">
    <div class="single-column">
      <h1>[h1] Land use</h1>
      <div>by Hannah Richie and Max Roser</div>
    </div>

    <div class="chart-right">
      <div class="left">
        <h2 id="nulla">[h2] Nulla profecto est, quin suam vim retineat a primo ad extremum.</h2>
        <h3>[h3] Quid enim ab antiquis ex eo genere</h3>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <a href="http://loripsum.net/" target="_blank">Duo Reges: constructio interrete.</a> Haec bene dicuntur, nec ego repugno, sed inter sese ipsa pugnant. Quid enim ab antiquis ex eo genere, quod ad disserendum valet, praetermissum est? <a href="http://loripsum.net/" target="_blank">Sed quot homines, tot sententiae;</a> </p>

<p>Tum Quintus: Est plane, Piso, ut dicis, inquit. Curium putes loqui, interdum ita laudat, ut quid praeterea sit bonum neget se posse ne suspicari quidem. Videamus igitur sententias eorum, tum ad verba redeamus. Respondeat totidem verbis. Et quidem, inquit, vehementer errat; </p>

<p>At, illa, ut vobis placet, partem quandam tuetur, reliquam deserit. Itaque hic ipse iam pridem est reiectus; Qualem igitur hominem natura inchoavit? Est enim effectrix multarum et magnarum voluptatum. <i>Omnia peccata paria dicitis.</i> Mihi quidem Antiochum, quem audis, satis belle videris attendere. Quid, si reviviscant Platonis illi et deinceps qui eorum auditores fuerunt, et tecum ita loquantur? Ergo hoc quidem apparet, nos ad agendum esse natos. </p>

<ul>
	<li>Sed quia studebat laudi et dignitati, multum in virtute processerat.</li>
	<li>Quia nec honesto quic quam honestius nec turpi turpius.</li>
	<li>Ita fit cum gravior, tum etiam splendidior oratio.</li>
	<li>Tum Triarius: Posthac quidem, inquit, audacius.</li>
	<li>Itaque contra est, ac dicitis;</li>
	<li>Omnia peccata paria dicitis.</li>
</ul>


<p>Odium autem et invidiam facile vitabis. Nam si amitti vita beata potest, beata esse non potest. <mark>Quid de Pythagora?</mark> Haec quo modo conveniant, non sane intellego. Hoc ipsum elegantius poni meliusque potuit. Non quam nostram quidem, inquit Pomponius iocans; Ne amores quidem sanctos a sapiente alienos esse arbitrantur. Qui enim voluptatem ipsam contemnunt, iis licet dicere se acupenserem maenae non anteponere. Egone non intellego, quid sit don Graece, Latine voluptas? Hoc non est positum in nostra actione. </p>
       

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <b>Itaque contra est, ac dicitis;</b> Illi enim inter se dissentiunt. <a href="http://loripsum.net/" target="_blank">Duo Reges: constructio interrete.</a> Illud dico, ea, quae dicat, praeclare inter se cohaerere. Qualis ista philosophia est, quae non interitum afferat pravitatis, sed sit contenta mediocritate vitiorum? Philosophi autem in suis lectulis plerumque moriuntur. <a href="http://loripsum.net/" target="_blank">Bonum liberi: misera orbitas.</a> Non igitur de improbo, sed de callido improbo quaerimus, qualis Q. </p>

<ul>
	<li>Cur igitur, inquam, res tam dissimiles eodem nomine appellas?</li>
	<li>Sed utrum hortandus es nobis, Luci, inquit, an etiam tua sponte propensus es?</li>
	<li>Iam id ipsum absurdum, maximum malum neglegi.</li>
	<li>Nunc dicam de voluptate, nihil scilicet novi, ea tamen, quae te ipsum probaturum esse confidam.</li>
</ul>


<p>Ex rebus enim timiditas, non ex vocabulis nascitur. Quae cum magnifice primo dici viderentur, considerata minus probabantur. Aut, Pylades cum sis, dices te esse Orestem, ut moriare pro amico? Quid enim est a Chrysippo praetermissum in Stoicis? Post enim Chrysippum eum non sane est disputatum. <a href="http://loripsum.net/" target="_blank">Audeo dicere, inquit.</a> Si enim ad populum me vocas, eum. </p>




      </div>
      <div class="right">
        <iframe src="https://ourworldindata.org/grapher/total-agricultural-area-over-the-long-term" style="width: 100%; height: 600px; border: 0px none;"></iframe>
      </div>
    </div>
    <div class="columns">
      <div class="left">
      </div>
      <div class="right">
      </div>
    </div>
    <div class="comparison-right">
      <div class="left">
        <h1 id="videamus">Videamus igitur sententias eorum, tum ad verba redeamus.</h1>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sin autem eos non probabat, quid attinuit cum iis, quibuscum re concinebat, verbis discrepare? <i>Stoicos roga.</i> Illa videamus, quae a te de amicitia dicta sunt. At ille pellit, qui permulcet
          sensum voluptate. </p>

        <h3>Sic enim censent, oportunitatis esse beate vivere.</h3>

        <p><mark>Quam ob rem tandem, inquit, non satisfacit?</mark> Sit enim idem caecus, debilis. </p>

        <h2>Ita similis erit ei finis boni, atque antea fuerat, neque idem tamen;</h2>

        <p>Quae diligentissime contra Aristonem dicuntur a Chryippo. Facile est hoc cernere in primis puerorum aetatulis. Apud imperitos tum illa dicta sunt, aliquid etiam coronae datum; Quid enim est a Chrysippo praetermissum in Stoicis? Quis enim confidit
          semper sibi illud stabile et firmum permansurum, quod fragile et caducum sit? </p>

        <ul>
          <li>Haec dicuntur inconstantissime.</li>
          <li>Ergo hoc quidem apparet, nos ad agendum esse natos.</li>
          <li>Quem si tenueris, non modo meum Ciceronem, sed etiam me ipsum abducas licebit.</li>
          <li>An ea, quae per vinitorem antea consequebatur, per se ipsa curabit?</li>
        </ul>

        <p>Quae diligentissime contra Aristonem dicuntur a Chryippo. Claudii libidini, qui tum erat summo ne imperio, dederetur. Qui ita affectus, beatum esse numquam probabis; <mark>Duo Reges: constructio interrete.</mark> His enim rebus detractis negat
          se reperire in asotorum vita quod reprehendat. Itaque quantum adiit periculum! ad honestatem enim illum omnem conatum suum referebat, non ad voluptatem. Quid affers, cur Thorius, cur Caius Postumius, cur omnium horum magister, Orata, non iucundissime
          vixerit? Videsne quam sit magna dissensio? </p>

      </div>
      <div class="right">
        <iframe src="https://ourworldindata.org/grapher/land-use-over-the-long-term" style="width: 100%; height: 600px; border: 0px none;"></iframe>
        <iframe src="https://ourworldindata.org/grapher/share-of-land-area-used-for-agriculture" style="width: 100%; height: 600px; border: 0px none;"></iframe>
      </div>
    </div>
    <div class="single-column">
      <h1>Res enim se praeclare habebat, et quidem in utraque parte.</h1>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <i>Quid de Platone aut de Democrito loquar?</i> Quid enim de amicitia statueris utilitatis causa expetenda vides. Nihil opus est exemplis hoc facere longius. <i>Duo Reges: constructio interrete.</i> Quem si tenueris, non modo meum Ciceronem, sed etiam me ipsum abducas licebit. </p>

<p><a href="http://loripsum.net/" target="_blank">Rationis enim perfectio est virtus;</a> Quod, inquit, quamquam voluptatibus quibusdam est saepe iucundius, tamen expetitur propter voluptatem. Cur igitur, cum de re conveniat, non malumus usitate loqui? Tu vero, inquam, ducas licet, si sequetur; Prodest, inquit, mihi eo esse animo. Quod idem cum vestri faciant, non satis magnam tribuunt inventoribus gratiam. </p>

<ul>
	<li>Quamvis enim depravatae non sint, pravae tamen esse possunt.</li>
	<li>Sed quamquam negant nec virtutes nec vitia crescere, tamen utrumque eorum fundi quodam modo et quasi dilatari putant.</li>
</ul>


<h2>Aliter enim explicari, quod quaeritur, non potest.</h2>

<p><b>Cur deinde Metrodori liberos commendas?</b> <i>Summus dolor plures dies manere non potest?</i> Ut enim consuetudo loquitur, id solum dicitur honestum, quod est populari fama gloriosum. Deinde disputat, quod cuiusque generis animantium statui deceat extremum. </p>

<p>Res enim se praeclare habebat, et quidem in utraque parte. Satis est tibi in te, satis in legibus, satis in mediocribus amicitiis praesidii. <b>Restinguet citius, si ardentem acceperit.</b> Quacumque enim ingredimur, in aliqua historia vestigium ponimus. Id enim natura desiderat. Qui autem de summo bono dissentit de tota philosophiae ratione dissentit. <a href="http://loripsum.net/" target="_blank">Traditur, inquit, ab Epicuro ratio neglegendi doloris.</a> Dulce amarum, leve asperum, prope longe, stare movere, quadratum rotundum. </p>


    </div>
  </div>
</div>
              
            
!

CSS

              
                $padding-x: 1rem;
$menu-height: 5rem;
$sidebar-height-sm: 3rem;
$sidebar-content-width: 14rem;
$text-min-content-width: 22rem;
$graph-min-content-width: 44rem;
$graph-max-content-width: 50rem;
$content-max-width-sm: 48rem;

$md-min-width: $text-min-content-width + $graph-min-content-width + 4 *
  $padding-x;
$lg-min-width: 2 * $graph-min-content-width + 4 * $padding-x;
$xlg-min-width: $lg-min-width + $sidebar-content-width + 2 * $padding-x;

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  @media (max-width: $xlg-min-width - 0.0625rem) {
    // only works on Chrome, demo only
    // scroll-padding-top: $sidebar-height-sm;  
  }
}

h1 {
  padding-top: $padding-x;
}

h2 {
    
}

@mixin pad-x {
  padding-left: $padding-x;
  padding-right: $padding-x;
}

@mixin pad-y {
  padding-top: $padding-x;
  padding-bottom: $padding-x;
}

@mixin content-wrapper {
  max-width: $content-max-width-sm;
  margin: auto;
  @media (min-width: $md-min-width) {
    max-width: 2 * $graph-max-content-width + 4 * $padding-x;     
  }
}

@mixin left-right {
  .left, .right {
    @include pad-x;
  }
  @media (min-width: $md-min-width) {
    display: flex;
    justify-content: flex-end;
    .left {
      flex-basis: 40%;
    }
    .right {
      position: sticky;
      top: $sidebar-height-sm;
      height: 100%;
      flex-basis: 60%;
    }
  }
  @media (min-width: $lg-min-width) {
    .right {
      flex-basis: 50%;
    }
  }
}

.menu {
  @include pad-x;
  height: $menu-height;
  background-color: lightblue;
  display: flex;
  align-items: center;
}
.sidebar {
  position: fixed;
  bottom: 0;
  z-index:1;
  height: $sidebar-height-sm;
  width: 100%;
  @media (min-width: $xlg-min-width) {
    position: sticky;
    top: 0;
    width: $sidebar-content-width + 2 * $padding-x;
    height: 100vh;
  }
  overflow: scroll;
  @include pad-x;
  @include pad-y;
  background-color: lightgrey;
  
  ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
  }
  
  li {
    margin-bottom: 0.5rem;
  }
}

@media (min-width: $xlg-min-width) {
  .sidebar-content {
    display: flex;
  }
}

.content {
  @include content-wrapper;
}

.single-column {
  @include pad-x;
  @media (min-width: $md-min-width) {
    width: 40%;
  }
  @media (min-width: $lg-min-width) {
    margin-left: 10%;
  }
}

.chart-right {
  @include left-right;
}

.comparison-right {
  @include left-right;
  @media (min-width: $lg-min-width) {
    display: block;
    .left {
      width: 40%;
      margin-left: 10%;
    }
    .right {
      display: flex;
      
      & > *:first-child {
        padding-right: $padding-x;
      }
      & > *:last-child {
        padding-left: $padding-x;
      }
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console