Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!--to show google icons -->

<body>
  <div id="page-wrapper">
    <header id=header class=headerT>
      <div class="logo">
        <img src="https://s3.amazonaws.com/freecodecamp/original_trombones.png" id="header-img" />
      </div>
      <nav id="nav-bar" class="nav-bar">
        <ul>
          <!--Cel mai bine, dupa cum am observat, e bine ca la bara de navigat sa fie ul cu elemente in care se pune <a>-->
          <li>
            <a href="#features" class="nav-link">Features</a>
          </li>
          <li>
            <a href="#how-it-works" class="nav-link">How It Works</a>
          </li>
          <li> <a href="#pricing" class="nav-link">Pricing</a>
          </li>
        </ul>
      </nav>
    </header>
    <div id="form-area">
      <form id="form" action="https://www.freecodecamp.com/email-submit" target="_top">
        <h2>Handcrafted, home made masterpieces</h2>
        <input type="email" name="email" id="email" placeholder="Enter your email address" /><br><br>
        <!--Desi linkul era ok si action la form era ok, nu mergea pentru ca nu pusesem "name="email" " la email input PENTRU CA "ONLY FORM ELEMENTS WITH A "NAME" ATTRIBUTE WILL HAVE THEIR VALUES PASSED WHEN SUBMITTING A FORM"-->
        <input type="submit" id="submit" value="GET STARTED" /><br><br>
        <!--value represents text on button -->
      </form>
    </div>
    <div id="features" class="features">
      <div class="icons">
        <span class="material-icons" style="font-size: 4em;">
          whatshot
        </span>
        <span class="material-icons" style="font-size: 4em;">
          local_shipping
          <!-- CHange icon size from HTML-->
        </span>
        <span class="material-icons" style="font-size: 4em;">
          battery_charging_full
        </span>
      </div>
      <div class="details">
        <ul class="contents">
          <h2>Premium Materials</h2>
          <li>Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase. </li>
          <h2>Fast Shipping</h2>
          <li>We make sure you recieve your trombone as soon as we have finished making it. We also provide free returns if you are not satisfied. </li>
          <h2>Quality Assurance</h2>
          <li>For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument. </li>
        </ul>
      </div>
    </div>
    <div class="how-it-works" id="how-it-works"></div>
    <div class="video-div">
      <iframe id="video" class="video" width="820" height="515" src=" https://www.youtube.com/embed/y8Yv4pnO7qc">
        <!--the URL to embed a YouTube video is https://www.youtube.com/embed/VIDEO_ID  -->
      </iframe>
    </div>
    <div id="pricing" class="pricing">
      <div class="trombone">
        <div class="title">Tenor Trombone</div>
        <h2>$600</h2>
        <ul class="lorem">
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum dolor.</li>
        <li>Lorem ipsum.</li>
      </ul >
        <input type="submit" id="submit" value="SELECT" />
      </div>
      <div class="trombone">
        <div class="title">Bass Trombone</div>
         <h2>$900</h2>
        <ul class="lorem">
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum dolor.</li>
        <li>Lorem ipsum.</li>
      </ul>
        <input type="submit" id="submit" value="SELECT" />
      </div>
      <div class="trombone">
        <div class="title">Valve Trombone</div>
         <h2>$1200</h2>
        <ul class="lorem">
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum dolor.</li>
        <li>Lorem ipsum.</li>
      </ul>
        <input type="submit" id="submit" value="SELECT" />
      </div>
    </div>

    <footer id="footer">
        <ul>
          <li><a href="#">Privacy</a></li>
          <li><a href="#">Terms</a></li>
          <li><a href="#">Contact</a></li>
        </ul>
        <span>Copyright 2016, Original trombones</span>
    </footer>
  </div>
</body>
              
            
!

CSS

              
                body{
  color:black;
  font-family: 'Recursive', sans-serif;
  background-color: #EDEAE4;
}
#page-wrapper {
    position: relative;
}
* {/* the asterisk selects all from html */ 
    margin: 0;
    padding: 0;
    box-sizing: border-box;/*The box-sizing property allows us to include the padding and border in an element's total width and height. "border-box" means that padding and border are included in width and height */
  color:black;
}
div{
  position:static;/*static-  it is always positioned according to the normal flow of the page. Default value for position */
}
header{
  position:fixed;/*When I scroll down, the header is still visible */
  top:0;
  min-height:75px;
  padding: 0px 80px 0px 30px;
  display:flex;
  align-items:center;
  /*flex-wrap:wrap; This made contents of header move to 2 different rows*/
  justify-content:space-around;
  background-color:#A093B8;
}
.logo{
  width: 60vw;/*This represents 60% of the viewport width */
}
#header-img{
width: 100%;
height: 100%;
max-width: 300px;
justify-content: center;
text-align: center;
}
.nav-bar{
  text-align:right;
  width: 35vw;
}
nav ul {/*nav ul targets ul inside nav */
 display: flex;
 flex-direction: row;
 justify-content: space-around;
}
 @media screen and (max-width: 750px) {
   nav ul{
     flex-direction:column;
     align-items:flex-start;/* when vp width changes this makes elements not go too the right too much. It aligns list items in center of nav, because nav width changes too. 
     Don't know if it's the perfect solution, but it works*/
   }
   header{
     padding: 0px 80px 0px 30px;
   }
}
li{
  list-style-type:none;
  margin:5px;
  padding:0;
  font-weight:700;
}
.nav-link{
  text-decoration:none;
}
#form-area{
  margin:100px 50px;
  text-align:center;
  padding:20px 10px;
}
#form{
  width:600px; /*When i used vw the width of form changed when width of vw changed DUH */
  max-width:600px;
  display:inline-block;
  text-align:center;
  /*margin: 0 auto;*/
  background-color:#C9C3D5;
}
h2{
  margin:20px;
} 
input[type='email']{
  width:20em;
  padding:0.3em;
  border:none;
  font-family: 'Homemade Apple', cursive;
}
input[type='submit']{
  background-color:#C778F5;
  width:11em; /* Relative to the font-size of the element (2em means 2 times the size of the current font)*/
  font-family: 'Holtwood One SC', serif;
  padding:0.5em;
  font-weight: 900;
  border:none;
}
.video-div{
   width:600px;
   max-width:600px; 
   margin: 0 auto; /* The margin: 0 auto is what does the actual centering*/
}
.video{
  width: 600px;
  height: 300px;
  object-fit: contain; /*Video/image adjusts to size of container - have to specify height in PX, NOT vw*/
  border:none;
}
.features{
  width:70%;
  margin:100px auto;
  padding-right:50px;
  display:flex;
  justify-content:space-between;
  flex-direction:row;
}
.icons{
  width:15vw;
  display:flex;
  justify-content:space-between;
  flex-direction:column;
  padding:20px;
}
.material-icons{
  color:#7D80DA;
  align-self:center;
  margin-top:20px;
  margin-bottom:30px;
}
.details{
  width:55vw;
  display:flex;
  justify-content:space-between;
  flex-direction:row;
  margin-right:20px;
}
.contents h2{
  margin-left:0;
  align-text:left;
  
}
.contents li{
  margin-left:0;
  text-align:justify;
  margin-bottom:40px;
}
@media only screen and (max-width: 1200px) {
  .details{
    max-width:600px;
    min-width:600px;
  }
  .features{
    max-width:700px;
    min-width:700px;
  }
}
/*-----------------PRICING----------------- */
.pricing{
  background-color: #EDEAE4;
  display:flex;
  flex-direction:row;
  width:100%;
  margin:50px auto;
  justify-content:center;
  box-sizing:border-box;
}
.trombone{
  justify-content:space-around;
  border: solid 1px;
  margin:10px;
  text-align:center;
  padding:0px 0px 15px;
  border-radius:3px;
}
.title{
background-color: #C9C3D5;
color: black;
padding: 15px 0;
width: 100%;
text-transform: uppercase;
font-weight: 700;
}
.lorem{
  margin-bottom:30px;
  margin-right:60px;
  margin-left:60px;
  text-align:center;
}
@media screen and (max-width: 900px) {
   .pricing{
     flex-direction:column;
     align-items:center;
}
}
footer span {
    margin-top: 5px;
    display: flex;
    justify-content: flex-end;
    font-size: 0.9em;
    color: #444;
}
footer{
    margin-top: 30px;
    background-color: #ddd;
    padding: 20px; 
}
footer ul{
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  text-align:center;
}
  footer ul li{
  padding: 0 10px;
}




              
            
!

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