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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <body>
    <div class="logo">
        <img src="https://picsum.photos/id/1062/100/100" alt="logo" class="logo-img">
    </div>
<header>
    <h1>Header</h1>
    
    <nav class="nav">
        <ul class="nav">
            <li><a href="#">Lorem</a></li>
            <li><a href="#">Ipsum</a></li>
            <li><a href="#">Dolor</a></li>
        </ul>
    </nav>
</header>
<main class="main">
    <div class="left">
        <div class="mHeader">
            <h2>Nam tincidunt</h2>
            <h3>ut porta lorem lacinia consectetur</h3>
            <p>Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
        </div>

        <div class="box1">

        </div>

        <div class="box2">

        </div>

        <h3>ut porta lorem lacinia consectetur</h3>
        <p>Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
        <p>Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. </p>

        <p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.</p>

        <ul>
            <li>In euismod ultrices</li>
            <li>Morbi id quam sapien</li>
            <li>Duis elementum</li>
            <li>Suspendisse</li>
        </ul>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus veniam libero hic quibusdam quasi molestias, quam tenetur perferendis nostrum maxime possimus reprehenderit cum nemo repellendus error reiciendis non iste dicta.</p>
        <p>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In euismod ultrices facilisis. Vestibulum porta sapien adipiscing augue congue id pretium lectus molestie. Proin quis dictum nisl. Morbi id quam sapien, sed vestibulum sem. Duis elementum rutrum mauris sed convallis. Proin vestibulum magna mi. Aenean tristique hendrerit magna, ac facilisis nulla hendrerit ut. Sed non tortor sodales quam auctor elementum. Donec hendrerit nunc eget elit pharetra pulvinar. Suspendisse id tempus tortor. Aenean luctus, elit commodo laoreet commodo, justo nisi consequat massa, sed vulputate quam urna quis eros. Donec vel. </p>
    </div>

    <div class="right">
        <div class="rbox">
            <h3>ut porta lorem lacinia consectetur</h3>
            <p>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In euismod ultrices facilisis. Vestibulum porta sapien adipiscing augue congue id pretium lectus molestie. Proin quis dictum nisl. Morbi id quam sapien, sed vestibulum sem. Duis elementum rutrum mauris sed convallis. Proin vestibulum magna mi. Aenean tristique hendrerit magna, ac facilisis nulla hendrerit ut. Sed non tortor sodales quam auctor elementum. Donec hendrerit nunc eget elit pharetra pulvinar. Suspendisse id tempus tortor. Aenean luctus, elit commodo laoreet commodo, justo nisi consequat massa, sed vulputate quam urna quis eros. Donec vel. </p>
            <p>Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

            <img src="https://picsum.photos/id/113/1024/512" alt="placeholder" class="img-r">
        </div>
    </div>
</main>

<footer>
Footer
</footer>
            
          
!

CSS

            
              @import url(https://fonts.googleapis.com/css?family=Lato:Lato:300,400,700,700i,900);

* {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

$c-navy: #010059;
$c-navy-grey: #9999b5;
$c-cobalt: #207dff;
$c-magenta: #8d309b;
$c-gold: #ffa900;
$c-white: #fff;

@mixin flexCenter {
	display: flex;
	justify-content: center;
	align-items: center;
}

@mixin flexCenterSB {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

@mixin breakpoint($width) {
    @if $width == mobile {
        @media (max-width: 50rem) { @content ; }
    }
}

body {
    margin: 2rem 5rem;
}

.img-r {
    max-width: 100%;
    display: block;
    height: auto;
}

.main {
    display: flex;
    border-top: .5rem solid $c-navy;
    border-bottom: .5rem solid $c-navy;

    @include breakpoint(mobile) {
        display: flex;
        flex-direction: column;
    }

    h2, h3, p, ul {
        margin-bottom: 1.3rem;
    }

    ul {
        margin-left: 2rem;
    }
}

header {
    @include flexCenterSB; 

    // margin: 1rem 2rem;
    padding-bottom: 2rem;

    ul {
        list-style: none;
        
        li {
            display: inline-block;

            &:not(:last-child) {
                margin-right: 2rem;
            }
        }
    }

    nav {

        @include breakpoint(mobile) {
            display: flex;
            flex-wrap: wrap;
        }

        a:link {
            color: $c-magenta;
            text-decoration: none;
        }
        a:hover {
            color: $c-cobalt;
            text-decoration: underline;
        }
    }

    h1 {
        color: $c-navy;
        font-size: 3rem;
    }
}
.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: -3rem;
    width: 100%;
}

.logo-img {
    border-radius: 50%;
}

.left {
    flex: 0 1 50%; 
    padding: 2rem;
}

.right {
    flex: 0 1 50%; 
    padding: 2rem;
    display: flex;
}

.left {
    border-right: .25rem solid $c-navy;
    background: lighten($c-navy-grey, 33%);

    @include breakpoint(mobile) {
        flex: 0 0 100%;
        padding: 2rem;
        border-right: none;
    }
}

.right {
    border-left: .25rem solid $c-navy;
    background: lighten($c-gold, 39%);

    @include breakpoint(mobile) {
        flex: 0 0 100%;
        padding: 2rem;
        border-left: none;
    }
}

.box1 {
    padding: 2rem; 
    background-color: $c-gold;
}

.box2 {
    padding: 2rem; 
    background-color: $c-magenta;
}

.rbox {
    padding: 2rem; 
    color: $c-white;
    background-color: $c-cobalt;
    flex: 1;
}

footer {
    padding: 3rem;
    color: $c-white;
    background-color: $c-navy;
}
            
          
!

JS

            
              
            
          
!
999px

Console