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

              
                <!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" type="text/css" href="main.css">
  <title>Product Landing Page</title>
</head>

<body>
  <header id="header">
    <img src="https://scontent.frgn5-1.fna.fbcdn.net/v/t1.0-9/66636057_615937305581294_3249117801369042944_n.jpg?_nc_cat=108&_nc_oc=AQn2qN3F5ZrPBC7xkjVxW5SlLX8ySseSYig1C6S2NnnlKUhfvqENjVl6XtiIgspfHRY&_nc_ht=scontent.frgn5-1.fna&oh=74726b1abddfefd0fe54e34df36fd0ac&oe=5DE76687"
      alt="Logo" id="header-img">
    <h1>Twitty</h1>
    <nav id="nav-bar">
      <a href="#services" class="nav-link">Services</a>
      <a href="#products" class="nav-link">Products</a>
      <a href="#video" class="nav-link">Videos</a>
    </nav>
  </header>

  <form id="form" action="https://www.freecodecamp.com/email-submit" method="post">
    <p>Enter your email to start shopping.</p>
    <input type="email" name="email" id="email" value="" size="40" placeholder="example@gmail.com"> <br>
    <input type="submit" name="register" id="submit" value="Get Started">
  </form>
  <br>

  <table id="services">
    <tr>
      <td><img src="https://m.media-amazon.com/images/S/aplus-media/mg/dbf4301f-af40-46f2-9a87-a99deddcd9a2._SL300__.jpg" alt="service-1" id="table-img"></td>
      <td id="table-header">
        <h3>Service 1</h3>
        <p>Description of service 1. bababa nanana banana potato naa bababa nanana banana potato naa</p>
      </td>
    </tr>
    <tr>
      <td><img src="https://vignette.wikia.nocookie.net/despicableme/images/2/2b/Stuart.png/revision/latest?cb=20161108162855" alt="service-2" id="table-img"></td>
      <td id="table-header">
        <h3>Service 2</h3>
        <p>Description of service 2. bababa nanana banana potato naa bababa nanana banana potato naa</p>
      </td>
    </tr>
    <tr>
      <td><img src="https://i.ebayimg.com/images/g/q7gAAOSwn8pbFCPf/s-l640.jpg" alt="service-3" id="table-img"></td>
      <td id="table-header">
        <h3>Service 3</h3>
        <p>Description of service 3. bababa nanana banana potato naa bababa nanana banana potato naa</p>
      </td>
    </tr>
  </table>

  <div id="products">
    <div class="flex-item">
      <div class="flex-content">
        <h4 class="product-name">Product 1</h4>
        <p id="price">18500 MMK</p>
        <p>Long description of the product. Long description of the product. Long description of the product. Long description of the product. Long description of the product.</p>
        <a href="#" class="buy-button">Purchase</a>
      </div>
    </div>
    <div class="flex-item">
      <div class="flex-content">
        <h4 class="product-name">Product 2</h4>
        <p id="price">7000 MMK</p>
        <p>Long description of the product. Long description of the product. Long description of the product. Long description of the product. Long description of the product.</p>
        <a href="#" class="buy-button">Purchase</a>
      </div>
    </div>
    <div class="flex-item">
      <div class="flex-content">
        <h4 class="product-name">Product 3</h4>
        <p id="price">44000 MMK</p>
        <p>Long description of the product. Long description of the product. Long description of the product. Long description of the product. Long description of the product.</p>
        <a href="#" class="buy-button">Purchase</a>
      </div>
    </div>
  </div>
  <br>
  <div #video-div>
    <iframe id="video" width="956" height="538" src="https://www.youtube.com/embed/1InLEZRawnI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </div>
  <br>

  <footer> Copyright 2019, Twitty Business All Rights Reserved. </footer>
</body>

</html>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
}

body {
  margin: 5px;
  padding: 5px;
  font-family: cursive;
  background-color: #ddd;
}

header > img {
  float: left;
  width: 80px;
  margin: 7px;
  border-radius: 50%;
}

header > h1 {
  float: left;
  letter-spacing: 3px;
  cursor: default;
}

header > nav {
  position: relative;
  top: 30px;
  float: right;
  margin-right: 20px;
}

nav > a {
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  color: black;
  margin: 10px;
  padding: 3px;
}

nav > a:hover {
  color: white;
}

.nav-link {
  font-variant: small-caps;
}

header {
  background-image: linear-gradient(#ccc, #fac3f0);
  position: sticky;
  top: 0;
  box-shadow: 0px 3px 5px black;
}

header::after {
  content: "";
  clear: both;
  display: table;
}

form {
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
}

input[type="email"] {
  height: 25px;
  border-radius: 4px;
  text-align: center;
}

input[type="submit"] {
  background-color: #e87685;
  background-clip: padding-box;
  border-radius: 5px;
  border-style: solid;
  padding: 7px 40px;
  cursor: pointer;
  margin-top: 5px;
}

input[type="submit"]:hover {
  background-color: #e36273;
}

table {
  margin-left: auto;
  margin-right: auto;
}

#table-img {
  display: block;
  margin-left: auto;
  margin-right: 5px;
  width: 100px;
}

tr {
  line-height: 30px;
}

#products {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 80%;
  margin: auto;
}
.product-name {
  width: 100%;
}

.flex-item {
  width: 33%;
  padding: 0px 4px;
}

.flex-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid black;
  background-color: #e1bdf0;
  text-align: center;
  height: auto;
}

.flex-content > h4 {
  background-color: #c254f0;
  padding: 12px 2px;
  font-variant: small-caps;
  font-size: 1.2em;
}

.flex-content > p {
  padding: 0px 7px;
}

#price {
  font-family: sans-serif;
  font-weight: bold;
  text-shadow: 3px 3px 7px grey;
  color: #fff;
}

.buy-button {
  text-decoration: none;
  background-color: #821b74;
  border: 1px solid blue;
  color: white;
  padding: 5px 15px;
  width: 100px;
  margin-bottom: 10px;
}

/* @media only screen and (min-width: 600px) {
   .flex-item {
     flex: 33.33%;
     max-width: 33.33%;
     padding: 0px 4px;
   }
 }*/

footer {
  text-align: center;
  background-color: #a2a2a2;
  padding: 5px;
  margin-top: 5px;
}

              
            
!

JS

              
                
              
            
!
999px

Console