Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <main>
    <div id="heading">
        <h1><span>Recent</span> News</h1>
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/575957/rss-icon.png" />
    </div>
    <article>
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/575957/its-less-risky-to-make-a-small-downpayment-250x141.jpg" />
        <div class="text">
            <h2>Before Making A 20% Mortgage Down Payment, Read This</h2>
            <p>August 8, 2017</p>
            <p>
                Making a large downpayment is not the conservative investment you believe it is. The risks of putting 20% down on a home are real. Know what you should do.
            </p>
        </div>
    </article>
    <article>
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/575957/minimum-fico-score-drops-to-580-250x141.jpg" />
        <div class="text">

            <h2>Minimum FHA Credit Score Requirement Falls 60 Points</h2>
            <span>August 8, 2017</span>
            <p>
                Credit score requirements are dropping for the FHA mortgage. Analysis and effect on U.S. home buyers, plus today's live FHA mortgage rates.
            </p>
        </div>
    </article>
    <article>
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/575957/8.8-1-250x109.png" />
        <div class="text">
            <h2>Mortgage Rates Today, August 8, Plus Lock Recommendations</h2>
            <span>August 8, 2017</span>
            <p>
                Mortgage rates today are driven by movements in financial markets worldwide. When the economy heats up, bond price drop, and rates increase. When the economy pulls back, interest rates tend to fall.
            </p>
        </div>
    </article>
</main>
              
            
!

CSS

              
                /* Layout */

main{
    display: flex;
    flex-direction: column;
    max-width: 780px;
    margin: 0 auto;
}
article{
    display: flex;
    align-items: flex-start;
}
#heading{
    display: flex;
    justify-content: space-between;
    align-items: center; 
}


/* Styling */

#heading h1 span{
    font-size: 1em;
    color: #71BC2F;
}
article{
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 20px;
    padding-bottom:20px;
}
article img{
    margin-right: 15px;
}
span{
    font-size: 11px;
}
p{
    font-size: 13px;
}
h2{
    margin: 0;
    padding: 0;
    line-height:1em;
}

@media (max-width: 779px){
    main{
        max-width: 90%;
        margin: 0 auto;
    }
    article{
        flex-direction: column;
    }
    article img{
        width: 100%;
        margin-bottom: 20px;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console