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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <head> <meta name='viewport' content='width=device-width', initial-scale=1>
  <meta charset='utf-8'>
  <link href="/your-path-to-fontawesome/css/all.css" rel="stylesheet">
  <script src="https://kit.fontawesome.com/8a7527178a.js" crossorigin="anonymous"></script>
</head>
<body>
  <div class='spacing-nav'><header id='header'>
    <nav id='nav-bar' class='nav-bar'>
    <img src='https://image.flaticon.com/icons/png/512/1815/1815995.png' alt='logo' id='header-img'>
      <ul>
        <li><a class='nav-link' href='#home' >Home</a></li> <li><a class='nav-link' href='#instruction'>Instruction</a></li>
        <li><a class='nav-link' href='#shop'>Shop</a></li>
    </nav>
  </header></div>
    <div id='space'><div>
    <div id='page-layer'>
      <form id='form' action="https://www.freecodecamp.com/email-submit">
        <p><strong>For further info leave your email!</strong><p>
        <label for='email'>Email: 
          <input type='email' id='email' name='email' placeholder='Ex: abc@gmail.com' required>
         <input type='submit' id='submit' value='submit'>
          </label>
      </form>
      <hr>
    </div>
      <div class='container'>
        <h2>Home</he>
    <section id='home' class='home'>
      <div class='icon'>
        <i class="fas fa-space-shuttle" style='font-size: 50px;color:teal; padding:20px;'></i>
        <p>The Rubik's Cube is a 3-D combination puzzle invented in 1974 by Hungarian sculptor and professor of architecture Ernő Rubik. Originally called the Magic Cube, the puzzle was licensed by Rubik to be sold by Ideal Toy Corp. in 1980 via businessman Tibor Laczi and Seven Towns founder Tom Kremer.  Rubik's Cube won the 1980 German Game of the Year special award for Best Puzzle. As of January 2009, 350 million cubes had been sold worldwide, making it the world's bestselling puzzle game and bestselling toy.</p>
      </div>
      <div class='icon'>
      <i class="fas fa-meteor" style='font-size: 50px; color: teal; padding:20px;'></i><p>On the original classic Rubik's Cube, each of the six faces was covered by nine stickers, each of one of six solid colours: white, red, blue, orange, green, and yellow. Some later versions of the cube have been updated to use coloured plastic panels instead, which prevents peeling and fading. In models as of 1988, white is opposite yellow, blue is opposite green, and orange is opposite red, and the red, white, and blue are arranged in that order in a clockwise arrangement. On early cubes, the position of the colours varied from cube to cube. An internal pivot mechanism enables each face to turn independently, thus mixing up the colours. For the puzzle to be solved, each face must be returned to have only one colour. Similar puzzles have now been produced with various numbers of sides, dimensions, and stickers, not all of them by Rubik.</p></div>
    </section>
    <section id='instruction'>
      <h2>A tutorial of solving a 3x3 rubik cube:</h2>
      <iframe width="560" height="315" src="https://www.youtube.com/embed/R-R0KrXvWbc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen id='video'></iframe>
    </section>
        <hr>
    <section id='shop' class='shop'>
      <h2 class="sale">The Cubic is for you!</h2>
      <div class='flex-container'>
      <div class='box'>Product 1
       <div id='text'>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru</div></div>
      <div class='box'>Product 2
       <div id='text'>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru</div></div>
      <div class='box'>Product 3
       <div id='text'>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru</div></div>
      </div>
    </section>
      </div>
</body>
              
            
!

CSS

              
                html {
  scroll-behavior: smooth;
}
@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cantarell&display=swap');
body {
  margin:0;
}
.spacing-nav{
  position: relative;
  height: 50px;
}
#page-layer{
  z-index:-1;
}
/** #space{
  top: 50px;
  position: relative;
  background-color: none;
}**/
#header{
  z-index: 1;
  top: 0;
  position: fixed;
  width: 100%;
  background-color: grey;
  margin:0;
}
#nav-bar{
  display: flex;
  justify-content: space-evenly;
}
#header img{
  width: 50px;
  align-self: center;
  padding-left: 20px;
}
#header-img{
  background-color: #04aa6d;
  padding-right:20px;
  padding-top:auto;
}
li {
  list-style-type:none;
  font-size: 25px;
  font-weight: bold;
  font-family:Orbitron, sans-serif;
}
a {
  text-decoration:none;
  color: black;
}
ul {
  width :100%;
  margin-top:0;
  margin-bottom:0;
  background-color:#e2f252;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: space-evenly;
}
a:hover{
  cursor: pointer;
  background-color:#04aa6d;
  color: white;
}
.nav-link {
  
}
div {
  font-family: Cantarell;
  text-align: center;
}
div #submit {
  border-radius: 20px;
  box-shadow: inset 1px 1px 2px orange;
}
.home {
  font-size: 20px;
  padding:10px 50px;
  line-height: 20px;
  text-align: justify;
}
div .icon{
  display:flex;
  align-items:center;
  border: 10px dotted Teal;
  border-sizing: border-box;
}
.container {
  margin: 100px;
}
.shop{
  
}
@media (max-width: 600px) {
.nav-bar{
  flex-wrap: wrap;
  }
  .container {
    margin: 0;
  }
  .spacing-nav{
    height:100px;
  }
  iframe {
    width: 90%;
    text-align: center;
  }
  .home {
    font-size: 16px;
  }
  div .icon{
    border: none;
    margin: 0;
    padding:0;
    flex-direction: column;
  }
}
#shop .sale{
  font-size:200%;
  margin:auto;
  color:teal;
  
}
#shop .flex-container {
 display:flex;
  c
 
}
#shop .flex-container .box {
 border-left:3px red solid;
 display:block;
 color:teal;
}
#shop .flex-container .box #text { 
   color:black;
  font-size:70%;
}

              
            
!

JS

              
                // !! IMPORTANT README:
const projectName = 'product-landing-page';

// 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