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>
  <title>Dollars to Donuts</title>
   <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<header id="header" class="container">
    <nav id="nav-bar">
      <ul>
    <li><a href="#our-donuts" class="nav-link">Our Donuts</a></li>
   <li><a href="#dollars-to-donuts" class="nav-link">Our History</a></li>
    <li><a href="#hours-locations" class="nav-link">Hours & Locations</a></li>
    <li><a href="#video" class="nav-link">How It's Done</a></li>
  </ul>
</nav>
  <a href="https://lh3.googleusercontent.com/Ln0KdZcNRLUSqxnxrbcRLGBoYpma_-413Y1pHUrc0ehvbTCxQLcu0wa00wzxWdlR6cnidzc5txMknODRIaxVQXJytv71wlHuI0lc3Lyrgn1QU0ev_R8ppLGiAPjQCRD_1JRZVSZ54hY=w2400?source=screenshot.guru"> <img id="header-img" src="https://lh3.googleusercontent.com/Ln0KdZcNRLUSqxnxrbcRLGBoYpma_-413Y1pHUrc0ehvbTCxQLcu0wa00wzxWdlR6cnidzc5txMknODRIaxVQXJytv71wlHuI0lc3Lyrgn1QU0ev_R8ppLGiAPjQCRD_1JRZVSZ54hY=w600-h315-p-k" alt="Pink Sprinkled Donut Missing a Bite">
  </a>
<h1>Dollars to Donuts</h1>
</header>

<main>
 <div class="heading" id="donuts">
  <h3>Our Donuts</h3>
  <div class="container1">
    <div><a href="https://lh3.googleusercontent.com/Xqm-Cph3jBadyRi0zg20r1NGiLsM5Y8t2QWYV999yfY_-3LCKoWyQ3_N6-soH-ithRpYDFiKy18JNC_VSTknnlCNi99BV2Vy_DlUar6sNf0AkpHZk4W9UrEa5srRt-hlrgGN9T1iMsA=w2400?source=screenshot.guru"> <img id="our-donuts" src="https://lh3.googleusercontent.com/Xqm-Cph3jBadyRi0zg20r1NGiLsM5Y8t2QWYV999yfY_-3LCKoWyQ3_N6-soH-ithRpYDFiKy18JNC_VSTknnlCNi99BV2Vy_DlUar6sNf0AkpHZk4W9UrEa5srRt-hlrgGN9T1iMsA=w600-h315-p-k" alt="Box with assorted flavors of donuts"></a></div>
  <div class="text"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse mi eros, commodo et pharetra ut, egestas vel turpis. Proin hendrerit libero vel nulla sollicitudin finibus. In hac habitasse platea dictumst.</p></div>
</div>
</div>
<div class="heading" id="dollars-to-donuts"> 
  <h3>From Donuts to Dollars to Donuts</h3>
  <div class="container2">
  <p class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="https://lh3.googleusercontent.com/N1uWIySW2UWKttBaKF_OvaAJ4qBTJC9NqEunj2Wo6qd1LAsl929OUN29KhedqPImnsN_aFrOiNWYgDizDuE3IQ8JhmliHGm-cpbpXIND6L0FYYXf08xi2h2aRFk4lbBAjmiLkv7x3s4=w2400?source=screenshot.guru"> <img id="shop" src="https://lh3.googleusercontent.com/N1uWIySW2UWKttBaKF_OvaAJ4qBTJC9NqEunj2Wo6qd1LAsl929OUN29KhedqPImnsN_aFrOiNWYgDizDuE3IQ8JhmliHGm-cpbpXIND6L0FYYXf08xi2h2aRFk4lbBAjmiLkv7x3s4=w600-h315-p-k" alt="A view inside the first Dollars to Donuts"></a>
  </div>
  </div>
<div class="heading" id="hours-locations">
  <h3>Hours & Locations</h3>
  <div class="container3">
  <a href="https://lh3.googleusercontent.com/rcqhyB83hEGSNC2O4XRYmZIzDt4W5YsYqg5kEOrsBkMfDOTn11Ktypb8fsG9vHfMbN9gK6joWO9yDy7WuH3rXfdFBpOZ6XqMkW7MClhiqFGxgdGFaD9BYaEYUS78seHp9TguFiJsJQQ=w2400?source=screenshot.guru"> <img id="hours" src="https://lh3.googleusercontent.com/rcqhyB83hEGSNC2O4XRYmZIzDt4W5YsYqg5kEOrsBkMfDOTn11Ktypb8fsG9vHfMbN9gK6joWO9yDy7WuH3rXfdFBpOZ6XqMkW7MClhiqFGxgdGFaD9BYaEYUS78seHp9TguFiJsJQQ=w600-h315-p-k" alt="A sign saying We're Open, with a lady wearing a face mask in the background"></a>
  <p>Lorem Ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  </div>
</div>

<div id="donuts-done" class="center">
   <h3>See How Donuts Are Made!</h3>
 <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/BwDuzrG-4lY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </div>

 <div id="mailing-list">
   <h3>Sign up for our email list to get news about our latest promotions!</h3>
 <form id="form" name="email-list" action="https://www.freecodecamp.com/email-submit">
    <input id="email" required type="email" name="email" placeholder="HomerSimp@email.com">
   <input id="submit" type="submit">
  </form>
  </div>
  
</main>






              
            
!

CSS

              
                .container {
  display: flex;
  background: rgba(245, 245, 255, 0.65);
  justify-content: flex-end;
  max-width: 100%;
  height: 10%;
}

#nav-bar {
  position: fixed;
  top: 0px;
  right: 0px;
  height: 2.9em;
  width: 100%;
}

.nav-link {
  color: darkolivegreen;
}

header {
  max-width: 100%;
  height: 15vh;
}

main {
  max-width: 100vw;
  height: auto;
}

img {
  max-width: 100%;
  height: 80%;
  padding-top: 30px;
}

h1 {
  text-align: right;
  font-size: 5rem;
  color: #00CC00;
  padding: 0.08em 0.2em;
}

nav {
  background-color: pink;
}

nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 2.5rem;
  list-style-type: none;
}

li {
  padding-left: 3em;
  padding-right: 1em;
}

h3 {
  margin: 0;
  padding-top: 20px;
  text-align: center;
}


.container1 {
  display: flex;
  /*justify-content: center;*/
  max-width: 100%;
  height: auto;
  margin: 50px;
}

.text {

  justify-content: center;
  align-self: center;
}

.container2 {
  display: flex;
  justify-content: center;
  max-width: 100%;
  height: auto;
  margin: 50px;
}

.container3 {
  display: flex;
  justify-content: center;
  max-width: 100%;
  height: auto;
  margin: 50px;
}

p {
  margin: 30px 30px;
  height: auto;
  max-width: 100%
}

#our-donuts {
  max-width: 50vw;
  height: auto;
  padding: 0px 30px 20px 0px;
}

#shop {
  max-width: 50vw;
  height: auto;
  padding: 0px 0px 20px 30px;
}

#hours {
  max-width: 50vw;
  height: auto;
  padding: 0px 30px 20px 0px;
}

#video {
  width: 70vw;
  margin-top: 2em;
}

.center {
  text-align: center;
}


#email {
  margin: 15px 10px;
}



@media screen and (max-width: 600px) {
  body {
    width: 50vw;
    height: 100vh;
    padding: 5px;
  }
  
  .container,
  .container1,
  .container2,
  .container3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 5px;
  }
  
}
              
            
!

JS

              
                

              
            
!
999px

Console