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

              
                <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Kevin flexbox challenge #4</title>
</head>
<body>
<!--  Hero section starts from here  -->
  <div class="hero">
    <div class="container">
      <div class="hero-content">
        <p class="sub-heading">
          Lorem ipsum sit
        </p>
        <h2 class="hero-heading">
          Responsive layouts don't
          <br>
          have to be a struggle
        </h2>
      </div>
    </div>
  </div>
<!--  Hero section ends here  -->

<!--  Quality section starts here  -->
  <div class="quality">
    <div class="container">
      <h3 class="quality-heading">
        Quality Designs
      </h3>
      <div class="row">
        <div class="col">
          <p class="paragraph-lines">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Dui vivamus arcu felis bibendum ut tristique. Arcu dui vivamus arcu felis. Sociis natoque penatibus et magnis dis. 
          </p>
        </div>
        <div class="col">
          <p class="paragraph-lines">
            Felis donec et odio pellentesque diam volutpat. Aliquam purus sit amet luctus venenatis. Turpis in eu mi bibendum neque egestas congue quisque egestas. Pellentesque sit amet por ttitor eget dolor morbi non.
          </p>
        </div>
      </div>
    </div>
  </div>
<!--  Quality section ends here  -->
  
<!--  Custom section starts from here  -->
  <div class="custom">
    <div class="container">
      <div class="row">
        <div class="col">
          <h3 class="custom-heading">
            Made custom for you
          </h3>
          <p class="paragraph-lines-white">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
          </p>
        </div>
        <div class="col">
          <img src="https://i.ibb.co/Ptj1HyJ/image-01.jpg" class="custom-img" alt="">
        </div>
      </div>
    </div>
  </div>
<!--  Custom section ends here  -->
  
<!--  Care section starts from here  -->
  <div class="care">
    <div class="container">
      <div class="row">
        <div class="col">
          <img src="https://i.ibb.co/J7139Fv/image-02.jpg" class="custom-img" alt="">
        </div>
        <div class="col">
          <h3 class="care-heading">
            Created with care
          </h3>
          <p class="paragraph-lines-white">
            Felis donec et odio pellentesque diam volutpat. Aliquam purus sit amet luctus venenatis. Turpis in eu mi bibendum neque egestas congue quisque egestas. Pellentesque sit amet por ttitor eget dolor morbi non.
          </p>
        </div>
      </div>
    </div>
  </div>
<!--  Care section ends here  -->
</body>
</html>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

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

body
{
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
}

.hero
{
  background-color: #f3eed9;
  min-height: 660px;
  padding: 160px;
}

.container
{
  width: 80%;
  max-width: 1128px;
  margin: 0 auto;
}

.hero-content
{
  text-align: center;
}

.sub-heading
{
  font-size: 18px;
  line-height: 36px;
  text-transform: uppercase;
  color: #222c2a;
}

.hero-heading
{
  font-size: 50px;
  line-height: 52px;
  font-family: 'Playfair Display', serif;
  color: #824936;
}

/* ------------ Quality section styling ------- */
.quality
{
  padding: 80px 0;
  margin: 0 auto;
}

.quality-heading
{
  font-size: 28px;
  font-family: 'Playfair Display', serif;
  color: #824936;
  text-align: center;
}

.row
{
  margin: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 50px;
}

.col
{
  width: 100%;
}

.paragraph-lines
{
  color: #222c2a;
  font-size: 18px;
  line-height: 24px;
}

/* --------- Custom section starts from here -------- */
.custom
{
  background-color: #222c2a;
  padding: 60px 0;
}

img
{
  max-width: 100%;
  width: 100%;
  height: auto;
}

.custom-heading, .care-heading
{
  color: #f3eed9;
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  margin-bottom: 16px;
}

.paragraph-lines-white
{
  color: #f3eed9;
}
/* ------- Custom section ends here ------- */

/* ------- Care section starts here -------- */
.care
{
  background-color: #824936;
  padding: 60px 0;
}
/* ------- Care section ends here -------- */

@media screen and (max-width: 420px)
{
  .hero
  {
    min-height: 100px;
    padding: 100px 10px;
  }
  
  .hero-heading
  {
    font-size: 22px;
    line-height: 30px;
  }
  
  .sub-heading
  {
    font-size: 12px;
    line-height: 36px;
  }
  
  .quality-heading
  {
    font-size: 20px;
    text-align: left;
  }
  
  .row
  {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
  }
  
  .paragraph-lines
  {
    font-size: 14px;
    line-height: 20px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console