Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 
https://coolors.co/41533f-94a685-783006-dd8d62-783006
- The freeCodeCamp Team 

-->

<!doctype html>
<html lang="en">

  <head>
    <title>King David IV of Georgia - The Builder</title>
    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Cabin&display=swap" rel="stylesheet">
  </head>

  <body>
    
    <div class="container">
      <nav>
        <h1 id="title">King David The Builder</h1>
        <ul>
          <li><a href="#facts">Facts</a></li>
          <li><a href="#tribute-info">Brif Hisotry</a></li>
          <li><a href="#sources">Sources</a></li>
        </ul>
      </nav>

      <main id="main">
          <div id="img-div">
            <figure>
              <img src="https://upload.wikimedia.org/wikipedia/commons/9/9a/Davit_Agmashenebeli.jpg" id="image">
              <figcaption id="img-caption">Fresco of David the builder holding the church of Gelati Monastery</figcaption>
            </figure>
          </div>

          <article id="facts">
            <h2>Facts</h2>

            <p>Reign	1089–1125</p>
            <p>Predecessor	George II</p>
            <p>Successor	Demetrius I</p>
            <p>Born	1073</p>
            <p>Kutaisi</p>
            <p>Died	24 January 1125 (aged 51–52)</p>
            <p>Tbilisi</p>
            <p>Burial	Gelati Monastery</p>
            <p>Spouse	Rusudan of Armenia</p>
            <p>Gurandukht of the Kipchaks [ka]</p>
            <p>Issue	Demetrius I</p>
            <p>Vakhtang</p>
            <p>George</p>
            <p>Tamar</p>
            <p>Kata</p>
            <p>Dynasty	Bagrationi</p>
            <p>Father	George II of Georgia</p>
            <p>Mother	Elene [ka]</p>
            <p>Religion	Georgian Orthodox Church</p>
            <p>Khelrtva	David IV დავით IV's signature</p>
          </article>

          <article id="tribute-info">
            <h2>Brief History</h2>

            <p>David IV, also known as David the Builder (Georgian: დავით აღმაშენებელი, Davit Aghmashenebeli) (1073– 24 January 1125), of the Bagrationi dynasty, was a king of Georgia from 1089 until his death in 1125.</p>

            <p>Popularly considered to be the greatest and most successful Georgian ruler in history and an original architect of the Georgian Golden Age, he succeeded in driving the Seljuk Turks out of the country, winning the Battle of Didgori in 1121. His reforms of the army and administration enabled him to reunite the country and bring most of the lands of the Caucasus under Georgia’s control. A friend of the church and a notable promoter of Christian culture, he was canonized by the Georgian Orthodox Church.</p>
          </article>

          <article id="sources">
            <h2>sources</h2>
            <ul>
              <li><a href="https://en.wikipedia.org/wiki/David_IV_of_Georgia" target="_blank" id="tribute-link">Wikipedia</a></li>
              <li><a href="https://www.ancient.eu/David_IV_the_Builder/" target="_blank">Ancient Europe</a></li>
            </ul>
          </article>
      </main>
    </div>

  </body>
</html>

              
            
!

CSS

              
                body {
  /*Why can't I declare values of #main here and still ahve this work? Spent so much time figuring out why it did not work*/
  background-color: white;
  margin: 0;
}

.container {
  display: grid;
  grid-template-columns: 25vw 1fr;
}

nav {
  grid-column: 1/2;
  height: 100vh;
  width: 25vw;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #94A685;
  overflow-x: hidden;
  padding-top: 20px;
}

#title {
  text-align: center;
  text-transform: uppercase;
  font-family: 'Cabin', sans-serif;
  font-size: 3em;
  color: white;
  margin: 10px;
}

nav ul {
  list-style: none;
  text-transform: capitalize;
}

nav li {
  padding: 15px;
}

nav a {
  color: #783006;
  font-family: 'Cabin', sans-serif;
  text-transform: capitalize;
  font-size: 2em;
  text-decoration: none;
  display: flex;
  justify-content: center;
}

nav a:hover {
  color: #DD8D62;
}

main {
  grid-column: 2/3;
}

#img-div {
  text-align: center;
}

#image {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

article {
  margin-left: 20px;
}

article h2 {
  text-transform: capitalize;
  font-family: 'Cabin', sans-serif;
  color: #783006;
}
              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console