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

              
                <header id="header">
  <div class="img-div">
    <h3><img id="header-img" src="https://cdn.pixabay.com/photo/2017/07/03/20/17/abstract-2468874_960_720.jpg" alt="company-logo">AJ's Art & Craft Online Store</h3>
  </div>

  <nav id="nav-bar">
    <ul class="nav-ul">
      <li>
        <a href="#gallery" class="nav-link">Gallery</a>
      </li>
      <li>
        <a href="#video-section" class="nav-link">DIY Videos</a>
      </li>
      <li>
        <a href="#shopping-section" class="nav-link">Shop</a>
      </li>
    </ul>
  </nav>

</header>
<main id="main">
  <div class="form-section">
    <form id="form" action="https://www.freecodecamp.com/email-submit">
      <input id="email" type="email" name="email" placeholder="Please Enter Your Email" required>
      <input id="submit" type="submit" value="Let's Get Started">
    </form>
  </div>
  <div class="intro-section">

    <p>Welcome to my online store for anything and everything in arts and craft.
      Lorem ipsum dolor sit amet,
      consectetur adipiscing
      elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
      Mauris vitae ultricies leo integer malesuada nunc vel risus commodo. Viverra aliquet eget sit amet
      tellus cras adipiscing
      enim eu. Arcu non sodales neque sodales ut etiam sit. At urna condimentum mattis pellentesque id
      nibh
      tortor id. At augue
      eget arcu dictum varius duis at consectetur. Et molestie ac feugiat sed lectus vestibulum mattis
      ullamcorper. Venenatis
      lectus magna fringilla urna porttitor rhoncus dolor. Sit amet luctus venenatis lectus. Et magnis dis
      parturient montes
      nascetur ridiculus.</p>
    <p>Imperdiet massa tincidunt nunc pulvinar sapien. Tincidunt praesent semper feugiat nibh sed pulvinar
      proin
      gravida hendrerit.
      A lacus vestibulum sed arcu non odio. Nulla at volutpat diam ut venenatis tellus. Elit scelerisque
      mauris pellentesque pulvinar
      pellentesque habitant. Sed sed risus pretium quam vulputate dignissim suspendisse. Amet commodo
      nulla
      facilisi nullam vehicula
      ipsum. Nullam ac tortor vitae purus faucibus ornare suspendisse. Quis blandit turpis cursus in.
      Fusce ut
      placerat orci nulla.
      In fermentum posuere urna nec tincidunt praesent semper feugiat. Mauris cursus mattis molestie a
      iaculis
      at erat pellentesque
      adipiscing. Ipsum nunc aliquet bibendum enim. In hac habitasse platea dictumst quisque sagittis
      purus
      sit amet. Enim tortor
      at auctor urna nunc. Enim ut sem viverra aliquet eget sit. Ultrices dui sapien eget mi. Netus et
      malesuada fames ac turpis
      egestas integer. Turpis massa sed elementum tempus egestas sed. Sapien nec sagittis aliquam
      malesuada
      bibendum arcu vitae.
      Tortor vitae purus faucibus ornare suspendisse sed nisi. Nulla pellentesque dignissim enim sit amet
      venenatis urna.
    </p>
  </div>
  <div id="video-section" class="video-section">
    <iframe id="video" width="400" height="250" src="https://www.youtube.com/embed/Z3izSjm5h0k" style="border: 2px solid black; box-shadow: 3px 3px 7px rgba(42, 25, 49, 0.9);"></iframe>
    <iframe id="video2" width="400" height="250" src="https://www.youtube.com/embed/rR_1dv8J73Y" style="border: 2px solid black; box-shadow: 3px 3px 7px rgba(42, 25, 49, 0.9);"></iframe>
  </div>
  <div id="gallery" class="gallery">
    <div class="paintings">
      <figure class="paintings-caption">
        <img src="https://cdn.pixabay.com/photo/2017/07/03/20/17/abstract-2468874_960_720.jpg" class="craftimages" alt="absract-painting-image">
        <figcaption>Lorem ipsum dolor sit amet,
          consectetur adipiscing</figcaption>
      </figure>
      <figure class="paintings-caption">
        <img src="https://cdn.pixabay.com/photo/2017/04/04/08/53/art-2200731_960_720.jpg" alt="landscape-painting-image">
        <figcaption>Lorem ipsum dolor sit amet,
          consectetur adipiscing</figcaption>
      </figure>
      <figure class="paintings-caption">
        <img src="https://cdn.pixabay.com/photo/2014/12/09/21/01/still-life-562357_960_720.jpg" class="craftimages" alt="still-life-painting-image">
        <figcaption>Lorem ipsum dolor sit amet,
          consectetur adipiscing</figcaption>
      </figure>
    </div>

    <div class="carvings">
      <figure class="paintings-caption">
        <img src="https://cdn.pixabay.com/photo/2018/05/23/18/06/sculpture-3424664_960_720.jpg" class="craftimages" alt="Wood-Carving Image">
        <figcaption>Lorem ipsum dolor sit amet,
          consectetur adipiscing</figcaption>
      </figure>
      <figure class="paintings-caption">
        <img src="https://cdn.pixabay.com/photo/2013/07/16/19/07/tara-163076__340.jpg" class="craftimages" alt="Wood-Carving Image">
        <figcaption>Lorem ipsum dolor sit amet,
          consectetur adipiscing</figcaption>
      </figure>
      <figure class="paintings-caption">
        <img src="https://cdn.pixabay.com/photo/2015/03/27/21/57/cat-695280__340.jpg" class="craftimages" alt="Wood-Carving Image">
        <figcaption>Lorem ipsum dolor sit amet,
          consectetur adipiscing</figcaption>
      </figure>
    </div>
  </div>
  <div id="shopping-section" class="shopping-section">
    <h3 class="Contact"> Thank you for showing interest in our products, we will contact you soon.
      Please enter
      your contact details below.</h3>
    <form id="form2" action="https://www.freecodecamp.com/email-submit">
      <label class="details">Name :</label><input type="text" class="details" placeholder="Enter Your Name">
      <label class="details">House Number :</label><input class="details" type="text" placeholder="Enter House number">
      <label class="details">Street :</label><input class="details" type="text" placeholder="Enter Street">
      <label class="details">Pin-Code :</label><input class="details" type="text" placeholder="Enter Pin-Code">
      <label class="details">Mobile Number :</label><input class="details" type="text" placeholder="Enter Mobile Number">
      <input id="submit-contact" type="submit" value="Submit Details">
    </form>
  </div>
</main>
<footer>
  <p>Click <a href="#">For More Information</a></p>
</footer>

              
            
!

CSS

              
                @media (max-width: 480px) {
  #header {
    display: flex;
    flex-direction: column;
    background-color: rgba(233, 224, 216, 1);
    position: fixed;
    min-height: 70px;
    z-index: 1;
  }
}

@media (max-width: 480px) {
  .img-div,
  #nav-bar {
    flex: auto;
  }
}

@media (max-width: 480px) {
  #gallery img {
    max-width: 250px;
    border: 2mm inset rgb(65, 21, 21);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background-image: url(https://cdn.pixabay.com/photo/2017/07/03/20/17/abstract-2468874_960_720.jpg);
  background-size: cover;
  background-attachment: fixed;
}

header {
  width: 100%;
  display: flex;
  flex-direction: row;
  background-color: rgba(233, 224, 216, 1);
  box-shadow: 3px 3px 7px rgba(42, 25, 49, 0.9);
  position: fixed;
  min-height: 70px;
  z-index: 1;
}

main {
  background-color: rgba(255, 235, 205, 0.8);
  overflow: hidden;
  position: relative;
  top: 70px;
}

.img-div {
  flex: 2;
  color: rgb(197, 4, 245);
  padding-left: 25px;
  align-self: center;
  font-size: 1.3em;
  font-style: italic;
  text-shadow: 3px 3px 7px rgba(42, 25, 49, 0.8);
}

#header-img {
  max-width: 10%;
  border-radius: 50%;
  vertical-align: middle;
  box-shadow: 3px 3px 7px rgba(42, 25, 49, 0.8);
  margin-right: 10px;
}

#nav-bar {
  flex: 1;
  align-self: center;
}

.nav-ul {
  list-style: none;
  padding: 0;
  display: flex;
}

.nav-ul li {
  flex: auto;
  padding: 5px;
  text-align: center;
  margin: 0 2px;
  border: 1px solid black;
  border-radius: 5px;
  background-color: rgb(176, 141, 209);
  box-shadow: 3px 3px 7px rgba(42, 25, 49, 0.9);
  font-size: 0.6em;
}

.nav-ul li:hover {
  background-color: rgb(120, 60, 172);
}

.nav-ul a {
  text-decoration: none;
  color: white;
}

#form {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 10px;
}

#email,
#submit {
  margin-top: 10px;
  padding: 5px;
  border: 1px solid black;
  border-radius: 5px;
  color: white;
  background-color: rgb(176, 141, 209);
  box-shadow: 3px 3px 7px rgba(42, 25, 49, 0.9);
  text-align: center;
}

#email:hover {
  background-color: rgb(120, 60, 172);
}

#submit:hover {
  cursor: pointer;
  background-color: rgb(120, 60, 172);
}

::placeholder {
  color: white;
}

.intro-section {
  margin: 0 50px;
  text-align: justify;
  font-style: italic;
  font-size: o.9em;
}

.intro-section p {
  margin: 20px 0;
}

.intro-section p:: {
  text-transform: uppercase;
  font-size: 1.1em;
  font-weight: bold;
}

#video,
#video2 {
  display: block;
  margin: 20px auto;
}

.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.gallery img {
  max-width: 25vw;
  margin: 20px;
  border: 5mm inset rgb(65, 21, 21);
  box-shadow: 5px 5px 11px rgba(42, 25, 49, 1);
}

#gallery img:hover {
  transform: scale(1.6);
}

.paintings-caption,
.carvings-caption {
  border: 1px solid rgb(84, 67, 107);
  text-align: center;
  font-size: 1.1em;
  font-style: italic;
  margin-bottom: 20px;
  background-color: rgba(122, 52, 150, 0.1);
  color: rgb(40, 10, 68);
  text-shadow: 3px 3px 7px rgba(42, 25, 49, 1);
}

.shopping-section h3 {
  text-align: center;
  font-style: italic;
  margin: 20px 0;
}

.details {
  display: block;
  width: 60%;
  margin: auto;
}

#form2 input {
  padding: 5px;
  border: 1px solid black;
  border-radius: 5px;
  background-color: rgb(176, 141, 209);
  box-shadow: 3px 3px 7px rgba(42, 25, 49, 0.9);
}

#form2 label {
  padding-top: 10px;
}

#submit-contact {
  display: block;
  width: 20%;
  margin: 20px auto;
  padding: 5px;
  border: 1px solid black;
  border-radius: 5px;
  color: white;
  background-color: rgb(176, 141, 209);
  box-shadow: 3px 3px 7px rgba(42, 25, 49, 0.9);
  text-align: center;
}

#submit-contact:hover {
  cursor: pointer;
  background-color: rgb(120, 60, 172);
}

footer {
  position: relative;
  top: 70px;
  padding: 20px;
  color: black;
  background-color: rgba(255, 235, 205, 0.8);
}

              
            
!

JS

              
                
              
            
!
999px

Console