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

              
                <div id="home-wrapper">
  <header class="hero" id="header">
    <div class="navbar" id="navbar">
      <h1 class="logo">Logo</h1>
      <nav class="nav-links">
        <ul>
          <li><a href="#">Home</a></li>
          <li><a href="#">About</a></li>
          <li><a href="#">Blogs</a></li>
          <li><a href="#">Contact</a></li>
        </ul>
      </nav>
    </div>
    <div id="showcase" class="showcase">
      <div id="showcase-content" class="container">
        <h1 class="hero-heading">Hero Heading</h1>   
        <p class="lead-text">Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempora, accusamus.</p>
        <a href="#" class="btn btn-primary">Read More</a> 
      </div>
    </div>  
  </header> 
  <main id="main-wrapper">
    <section id="main-cards" class="card-container container">
      <div class="card">
        <div class="card-header">
          <h2>Blog Post</h2>
          <small>By John Doe, 05<sup>th</sup> May, 2021</small>
        </div>
          
        <!-- card body split into two halves -->
        <div class="card-body">
          
          <div class="card-body-column column-1">
            <img src="https://images.unsplash.com/photo-1501504905252-473c47e087f8?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=400&q=80" alt="Macbook Pro near white open book and pen">
          </div>
          
          <div class="card-body-column column-2">
            <h3>Lorem ipsum dolor sit amet.</h3>
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero veritatis, recusandae voluptatum, consectetur quas adipisci ducimus dolorem asperiores nemo doloremque reiciendis nesciunt delectus consequatur dicta nobis inventore praesentium? Accusamus, iste...</p>
          </div>
          
        </div>
        <!-- card body ends here -->
          
        <div class="card-footer">
          <a href="#" class="btn btn-white btn-block">Read This Blog</a>
        </div>
      </div>
      <div class="card">
        <div class="card-header">
          <h2>Blog Post</h2>
          <small>By John Doe, 21<sup>st</sup> April, 2021</small>
        </div>
        
        <!-- card body split into two halves  -->
        <div class="card-body">
          
          <div class="card-body-column column-1">
            <img src="https://images.unsplash.com/photo-1501504905252-473c47e087f8?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=400&q=80" alt="Macbook Pro near white open book and pen">
          </div>
          
          <div class="card-body-column column-2">
            <h3>Lorem ipsum dolor sit amet.</h3>
            <p>
                Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero veritatis, recusandae voluptatum, consectetur quas adipisci ducimus dolorem asperiores nemo doloremque reiciendis nesciunt delectus consequatur dicta nobis inventore praesentium? Accusamus, iste...
            </p>
          </div>
          
        </div>
        <!-- card body ends here -->
        
        <div class="card-footer">
          <a href="#" class="btn btn-white btn-block">Read This Blog</a>
        </div>
      </div>
    </section>
  </main>
  <footer id="footer" class="bg-primary">
    <div class="footer-container container">
      <p><em>Bharati Subramanian</em></p>
      <p>&copy; 2021</p>
    </div>
  </footer>
</div>
              
            
!

CSS

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

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: #fff;
}

.container {
    max-width: 1220px;
    margin: 0 auto;
}

.btn {
    margin: 1.5rem 0;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    font-size: 1.2rem;
}

.btn-primary {
    background-color: #0391dd;
    color: #fff;
}

.btn-primary:hover {
    background: rgba(3, 7, 28);
}

.hero-heading {
    font-size: 3.5rem;
}

.lead-text {
    font-size: 1.5rem;
    margin: 0.5rem 1.5rem;
}

.link {
    padding: 0.75rem 1rem;
}

.round {
    border-radius: 50px;
}

.bg-primary {
    background-color: #0391dd;
    color: #fff;
}

.bg-tertiary{ 
    background-color:#778ba5;
    color:#03071e;
}

#navbar {
    padding: 1rem;
    background: #0391dd;
    color: #fff;

}

#navbar nav ul li{
    margin: 0 1rem;
}

#navbar nav ul li a {
    padding: 0.5rem 0.75rem;
}

#navbar nav ul li a:hover {
    background: #000;
    color: #fff;
    border-radius: 5px;
}


.showcase {
     background: url('https://images.unsplash.com/photo-1542435503-956c469947f6?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=2000&q=200') no-repeat center center/cover;
    height: 100vh;
    padding: 0 1rem;
    width: 100%;
    display: flex; /* Remove this when you display showcase content properly */
    position: relative;
} 

.showcase::before {
    content: "";
    position:absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(3, 7, 28, 0.65);
}


.showcase * {
    z-index: 10;
}

#showcase-content {
    color: #fff;
    height: 100%;
}

#main-wrapper {
    width: 100%;
    background: #e5e5e5;
    padding: 2rem;
}

section#main-cards {
    padding: 1rem 0 1rem 2rem;
}

.card {
    margin: 0 1rem 2rem 0rem;
    border-radius: 10px;
    color: #fff;
    background: #778ba5;
    flex-direction: column;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4);;
}

.card-header {
    background-color: #03071e;
    padding: 1rem 2rem;
    border-radius: 10px 10px 0 0;
}

.card-body {
    width: 100%;
    height: 100%;
}

.card-body-column {
    text-align: center;
}


.column-2 {
    margin: 1rem;
}

.column-2 h3 {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
}



.card-footer {
    text-align: center;
    width: 100%;
    background: #fff;
    padding: 0.75rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 0 0 10px 10px;
}

.card-footer > a {
    color: #03071e;
}

#footer {
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


              
            
!

JS

              
                
              
            
!
999px

Console