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.

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 class='golden-grid'>
    <!-- Background -->
    <div style='grid-area: 1 /  11 / span 20 / span 10;'></div>
    <!-- Photo -->
    <div style='grid-area: 4 /  13 / span 14 / span 4;'></div>
    <!-- Arrows in the corners -->
    <div style='grid-area: 3 /   3 / span 1 / span 2;'></div>
    <div style='grid-area: 3 /  17 / span 1 / span 2;'></div>
    <!-- Big text -->
    <div style='grid-area: 7 /  4 / span 1 / span 4;'></div>
    <!-- Left panel -->
    <div style='grid-area: 11 /  3 / span 5 / span 1;'></div>
    <!-- Bottom-left panel -->
    <div style='grid-area: 17 /  4 / span 1 / span 4;'></div>
    <!-- Text block in the middle -->
    <div style='grid-area: 12 /  8 / span 6 / span 3; transform: translateX(10%);'></div>
    <!-- Logo -->
    <div style='grid-area: 3 /  10 / span 1 / span 2;'></div>
    <!-- Right panel -->
    <div style='grid-area: 8 /  18 / span 6 / span 1;'></div>
</div>

<div class='golden-grid'>
    <!-- Photo with a girl -->
    <div style='grid-area: 11 /  1 / span 10 / span 12;'></div>
    <!-- Background on the left side -->
    <div style='grid-area:  1 /  7 / span 20 / span  6;'></div>
    <!-- Background on the right side -->
    <div style='grid-area: 14 / 15 / span  7 / span  6;'></div>
    <!-- Purple block -->
    <div style='grid-area:  1 /  9 / span 13 / span 12;'></div>
    <!-- Hamburger -->
    <div style='grid-area:  3 / 17 / span  1 / span  1;'></div>
    <!-- Small text -->
    <div style='grid-area:  3 / 10 / span  1 / span  2;'></div>
    <!-- “The” -->
    <div style='grid-area: 14 / 11 / span  1 / span  2;'></div>
    <!-- “Cools” -->
    <div style='grid-area: 15 / 11 / span  3 / span  6;'></div>
    <!-- “how to” -->
    <div style='grid-area:  7 / 16 / span  4 / span  1;'></div>
    <!-- A little text near the “how to” -->
    <div style='grid-area:  7 / 17 / span  1 / span  1;'></div>
</div>
              
            
!

CSS

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

body {
    background: #000;
}


.golden-grid {
    display: grid;
    position: relative;
    height: 100vh;
    min-height: 700px;
    width: 100%;
    background: #FAFAD2;
    grid-template-rows:    1fr 1fr 2fr 4fr 2.66fr 5.33fr 5.33fr 4.33fr 2.83fr 3.5fr 3.5fr 2.83fr 4.33fr 5.33fr 5.33fr 2.66fr 4fr 2fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 2fr 4fr 2.66fr 5.33fr 5.33fr 4.33fr 2.83fr 3.5fr 3.5fr 2.83fr 4.33fr 5.33fr 5.33fr 2.66fr 4fr 2fr 1fr 1fr;
    background: url('https://habrastorage.org/webt/1k/ir/gl/1kirglnrstiva5u2b1yqiagwrqu.jpeg') left top / 100% 100% no-repeat;
}

.golden-grid div {
    background: rgba(0, 0, 0, .5);
    border: solid #f00 5px;
}

.golden-grid:first-of-type {
    /* Чисто для примера, чтобы визуально разделить две сетки */
    margin-bottom: 30vh;
}
              
            
!

JS

              
                
              
            
!
999px

Console