cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <body>

    <div class="container">

        <header>
            <nav>
            <i class="fa fa-square fa-3x" aria-hidden="true"></i>
            <i class="fa fa-circle fa-3x" aria-hidden="true"></i>
              <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Contact</a></li>
              </ul>
            </nav>
        </header>

        <aside class="sidebar">
            <h3>Search</h3>
            <form class="search-form">
              <div class="search-field-container">
                <input type="text" class="search-field" placeholder="Search here..." />
              </div>
            </form>
            <h3>Who am i?</h3>
            <p> I'm an ui designer and developer from Antalya, Turkey. Also I am in preparatory year at Bahcesehir University. I will be a software engineer.
            <a href="#">More...</a></p>
            <h3>Social</h3>
            <ul>
                <li><a href="#">Facebook</a></li>
                <li><a href="#">Twitter</a></li>
                <li><a href="#">Instagram</a></li>
              </ul>
        </aside>

        <section class="main">
                  <img src="https://cdn.pbrd.co/images/GK1rciG.jpg">

            <h2>Css Grid Template</h2>

            <div class="post-meta">
              <ul>
                <li>
                  <i class="fa fa-clock-o" aria-hidden="true"></i>
                  <time datetime="12-09-2017" itemprop="datePublished">12.09.2017</time>
                </li>
                <li>
                  <i class="fa fa-user" aria-hidden="true"></i>
                  <a href="#" itemprop="author">nurcin</a>
                </li>
                <li>
                  <i class="fa fa-folder-open" aria-hidden="true"></i>
                  <a href="#" itemprop="articleSection">coding</a>
                </li>
                <li>
                  <i class="fa fa-tags" aria-hidden="true"></i>
                  <a href="#" itemprop="keywords">HTML</a>,
                  <a href="#" itemprop="keywords">CSS</a>,
                  <a href="#" itemprop="keywords">grid</a>
                </li>
              </ul>
            </div>

            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <blockquote>
              <p>
              Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
              </p>
            </blockquote>

      </section>

        <footer>
          <p class="love">Made with <i style="color: red" class="fa fa-heart" aria-hidden="true"></i> by Nurçin Özer for Smashing Magazine</p>
        </footer>

    </div>

  </body>

            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Nunito:400,600,700&subset=latin-ext');

@import url('https://fonts.googleapis.com/css?family=Roboto+Slab&subset=latin-ext');

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

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
  color: #9eebcf;

}

p {
  font-family: 'Roboto Slab', serif;
  font-size: 16px;
  line-height: 30px;
}

blockquote {
  border-left: 10px solid #ff725c;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
  color: #ff725c;
  content: open-quote;
  font-size: 4em;
  line-height: 0.1em;
  margin-right: 0.25em;
  vertical-align: -0.4em;
}
blockquote p {
  display: inline;
  color: #ff725c;
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
}

body {
    background-color: #fff;
    color: #434344;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
}

/* Page Layout */

.container{
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 2fr 5fr;
    grid-template-areas:
        "header header"
        "sidebar main"
        "footer footer";
    grid-gap: 30px;
}

/* Header */

header{
    text-align: center;
    grid-area: header;
    color: #5e2ca5;
    text-transform: uppercase;
    padding: 20px;
    display: grid;

}

header nav {
    list-style-type: none;
    font-family: 'Nunito', sans-serif;
}

header nav li {
    margin-right: 15px;
    display: inline-block;
}

.fa-square {
    margin-bottom: 25px
}

/* Main Section */

.main {
    grid-area: main;
    border: 1px solid rgb(235,235,235);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    float: left;
}

.main h2 {
    font-size: 32px;
    margin: 1rem 0;
    background-color: #5e2ca5;
    color: #9eebcf;
    top: 5%;
    padding: 0.25em 0.75em;
    position: absolute;
}

.main p {
    margin-bottom: .75rem;
    padding-top: 10px;
}

.main img {
    width: 100%;
    padding-bottom: 10px;
}

/* Metadata */
.post-meta {
  margin: 0;
  padding: 10px;
  text-align: center;
  border-top: 1px solid #d0d0d0;
  border-bottom: 1px solid #d0d0d0;
}

.post-meta ul {
  list-style: none;
}

.post-meta li {
  display: inline-block;
  margin-left: 1em;
  color: #d0d0d0;
}

.post-meta a {
  color: #d0d0d0;
  text-decoration: none;
}

.post-meta a:hover {
  color: #ff725c;
}



/* Sidebar */

.sidebar {
    grid-area: sidebar;
    padding: 20px;
    border: 1px solid rgb(235, 235, 235);
    border-radius: 10px;
}

.sidebar h3 {
  font-size: 32px;
  padding-bottom: 5px;
  border-bottom: 2px solid #9eebcf;
}

.sidebar p {
  padding-top: 10px;
  padding-bottom: 50px
}

.sidebar p a {
  color: #5e2ca5;
}

.sidebar p a:hover {
  color: #9eebcf;
}


.sidebar ul {
  list-style-type: none;
  margin-top: 1rem;
  font-family: 'Roboto Slab', serif;
  font-size: 16px;
  line-height: 24px;
}

.sidebar ul > li {
  padding: .25rem 0;
}

.search-field-container {
  position: relative;
}

.search-field {
  width: 100%;
  position: absolute;
  right: 0;
  top: 0;
}

.search-field-container {
  display: block;
  height: 35px;
}

.search-form {
  margin-top: 10px;
  margin-bottom: 50px
}

.search-field {
  background-color: #fff;
  font-size: 14px;
  padding: 8px;
  border: 1px solid rgb(235, 235, 235);
  outline: none;
  -moz-border-radius: 4px;
  border-radius: 4px;
}

::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  font-family: 'Roboto Slab', serif;
  font-size: 16px;
  line-height: 24px;
}
::-moz-placeholder { /* Firefox 19+ */
  font-family: 'Roboto Slab', serif;
  font-size: 16px;
  line-height: 24px;
}
:-ms-input-placeholder { /* IE 10+ */
  font-family: 'Roboto Slab', serif;
  font-size: 16px;
  line-height: 24px;
}
:-moz-placeholder { /* Firefox 18- */
  font-family: 'Roboto Slab', serif;
  font-size: 16px;
  line-height: 24px;
}

/* Footer */

footer {
    grid-area: footer;
    color: #333;
    text-align: center;
    padding: 20px 0;
}

footer p {
    color: #434344;
    padding: 10px;
}


@media (max-width: 768px) {
    .container{
        /*  Redefine the grid into a single column layout. */
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main"
            "sidebar"
            "footer";
    }
 
    .main h2 {
        position: static;
        margin-top: -5px;
        margin-bottom: -5px;
        font-size: 32px;
        text-align: center;
        background-color: transparent;
        overflow-x:hidden
    }
  
}

            
          
!
999px
Loading ..................

Console