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

              
                <body>
  <header id="header">
     <div id="hamburger-nav-bar-line"></div>
    <div id="navigation"></div>
     <div class="logo">
    <img id="header-img" src="https://www.iconfinder.com/icons/5498420/attire_deel_man_mongolia_traditional_icon" 
         alt="the shop logo" />
    <p id="logo-name">Mongol Deel Shop.</p></div>
    
       <nav id="nav-bar">
         <label for="hamburger-checkbox" id="ham-nav-icon" aria-hidden="true"
                    >&#9776;</label
                >
                <input type="checkbox" id="hamburger-checkbox" aria-hidden="true" />
  <ul id="nav-bar-list" class="nobullets">
    <li><a class="link nav-link" href="#About-Us"> About Us </a></li>
    <li>
      <a class="link nav-link" href="#Shop"> Shop </a>
    </li>
    <li><a class="link nav-link" href="#Sign-Up"> Sign Up </a></li>
  </ul>
      </nav>
     <div id="About-Us"></div>
    <div id="Shop"></div>
    <div id="Sign-Up"></div>
  </header>
<main>
  <div class="mid-section"></div>
        <div id="about-us"> 
            <h2 class="info">About Us</h2>
    </div>
    <h3 id="shop">Shop</h3> 
    <div class="shop-group"></div>
          
          <div id="video-container">
            <iframe  id="video" width="840" height="473" src="https://www.youtube.com/watch?v=z4Y4-5iKnyA" title="YouTube video player"  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>    
          </div>
         <h4 class="sign" id="sign">Sign Up To Receive Monthly Newsletter</h4>
          <form id="form" action="https://www.freecodecamp.com/email-submit">
                             <label for="email">Email</label>
        <div class="email-field">  </div>
            <input type="email" id="email" name="email" placeholder="Enter Your Email Here">
            <button type="submit" id="submit">Submit</button>
                            <div class="checkbox-div">
                                <input
                                    type="checkbox"
                                    id="newsletter"
                                    name="newsletter"
                                    value="newsletter"/>
                                <label for="newsletter" id="subscribe-label"
                                    >Subscribe me to monthly newsletter</label
                                >
          </div>
                        </form>
  </main>
</body>

  
<!--

User Story #8: Within the form, there is an input field with id="email" where I can enter an email address.

User Story #9: The #email input field should have placeholder text to let the user know what the field is for.

User Story #10: The #email input field uses HTML5 validation to confirm that the entered text is an email address.

User Story #11: Within the form, there is a submit input with a corresponding id="submit".

User Story #12: When I click the #submit element, the email is submitted to a static page (use this mock URL: https://www.freecodecamp.com/email-submit).

User Story #13: The navbar should always be at the top of the viewport.

User Story #14: My product landing page should have at least one media query.

User Story #15: My product landing page should utilize CSS flexbox at least once.

-->
              
            
!

CSS

              
                header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 0px 20px;
  background-color: rgb(106, 151, 222);
  z-index: 10;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
@import url("https://fonts.googleapis.com/css2?family=Hind+Siliguri&family=Ubuntu:wght@500&display=swap");
html {
	scroll-behavior: smooth;
	box-sizing: border-box;
	font-size: 100%;
	--color-dark-blue: #f74d86e1;
	--color-light-grey: #e0e4e9;
	--color-white: #fcfafa;
	--color-black-text: #202020;
	--color-grey-text: #383838;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (max-width: 600px) {
    #nav-bar {
  background-color: rgba(178, 215, 50, .8);
	color: rgba(255, 255, 255, 1);
  align-items: center;
  justify-content: space-between;
	display: flex;
	padding: 0.5vw;
  padding-left: 2rem;
    }
  *,
*:before,
*:after {
	box-sizing: inherit;
}
  @media (max-width: 600px) {
    #nav-bar {
      display: flex;
      flex-direction: column;
    }
 body {
    margin: 0;
    padding: 0;
}
    .menu {
      display: flex;
      flex-wrap: wrap;
      flex-direction: column;
      align-items: center;  
    }
 #header-img {
  width: 4rem;
    }
 ul {
  list-style: none;
}
/****sign-up****/

#video-container {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%;
  margin: 0 auto;
}

#video {
  margin: 0 auto;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 70%;
  height: 70%;
  border-radius: 5px;
  border: none;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.sign {
  font-family: 'Condiment', cursive;
  font-size: 2rem;
  text-align: center;
  margin: 0;
  padding-bottom: 1rem; 
}

label {
  font-family: 'Montserrat', sans-serif;
  display: block;
  text-align: center;
  padding-bottom: 1rem;
}

#email {
  width: 40%;
  height: 2.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 3rem;
}

@media(max-width: 760px) {
  #email {
    font-size: .9rem;
  }
}

.email-field {
  display: flex;
  justify-content: center;
}

#submit {
  Background-color: #B2D732;
  color: white;
  border: none;
  height: 2.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
}

#submit:hover {
  background-color: #56690e;
}

footer {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  color: white;
  background-color: rgb(255, 165, 0);
  margin-left: 3rem;
  margin-right: 3rem;
  border-radius: 4px 4px 0 0;
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)
}
              
            
!

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