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 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

              
                <!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="main.css">
  <link href="https://fonts.googleapis.com/css?family=Raleway:400,700" rel="stylesheet">
</head>
<body>
  <nav>
    <ul>
      <li><a href="#">1</a></li>
      <li><a href="#">2</a></li>
      <li><a href="#">3</a></li>
      <li><a href="#">4</a></li>
      <li><a href="#">5</a></li>
      <li><a href="#">6</a></li>
    </ul>
  </nav>
  <header>
    <div id="header-wrapper">
      <div id="header-container">
        <h1>Jane Bloglife</h1>
        <p>Welcome to the blog of <span class="jo">Jane's World</span></p>
      </div>
    </div>
  </header>
  <section id="hero">
    <div id="hero-text-container">
      <h2>Jane's</h2>
      <h1>Fashion Blog</h1>
      <h2><a href="">Subscribe</a></h2>
    </div>
  </section>
  <section id="blog">
    <div id="blog-content">
      <div id="main-content">
        <div class="card">
          <h1>Title Heading</h1>
          <h3>Title descript, May 2, 2016</h3>
          <img src="https://www.w3schools.com/w3images/girl_hat.jpg" alt="">
          <p><strong>More Hats!</strong> I am crazy about hats these days. Some text about this blog entry. Fashion fashion and mauris neque quam, fermentum ut nisl vitae, convallis maximus nisl. Sed mattis nunc id lorem euismod placerat. Vivamus porttitor magna enim, ac accumsan tortor cursus at. Phasellus sed ultricies mi non congue ullam corper. Praesent tincidunt sedtellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla.</p>
          <p>Sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
        </div>
      </div>
      <div id="side-content">
        <div class="side-card">
          <img src="https://www.w3schools.com/w3images/avatar_girl2.jpg" alt="">
          <h2>My Name</h2>
          <p>Just me, myself and I, exploring the universe of uknownment. I have a heart of love and a interest of lorem ipsum and mauris neque quam blog. I want to share my world with you.</p>
        </div>
      </div>
    </div>
  </section>
</body>

</html>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
}

body {
  background: #F0F0F0; 
  font-family: 'Raleway', sans-serif;
}

nav {
  width: 100%;
  height: 35px;
  background-color: black;
}

nav  ul  li {
  list-style: none;
  display: inline-block;
  padding:8px;
  /* you didn't needed margin padding is better to see */
  padding-left:20px;
  padding-right:20px;
}
nav  ul  li  a {
  text-decoration: none;
  color: white;
}

nav  ul :hover{
  color:black;
  background-color: 	rgb(211,211,211);
}
/* Header */
header {
  width: 80%;
  height: 300px;
  margin: 0 auto;
}

#header-wrapper {
  text-align: center;
  width: 100%;
  background: whitesmoke;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}


#header-container > h1 {
  text-transform: capitalize;
  font-size: 48px;
}

#header-container > p {
  margin: 15px 0;
  font-size: 18px;
  word-spacing: 5px;
}

#header-container > p > span {
  color: white;
  background-color: black;
  padding: 10px;
}

/* Hero */
#hero {
/*  I changed the height to vw instade of vh wich will not srink the picture when the screen height becomes smaller  */
  width: 100vw;
  height: 80vw;
  background: url("https://www.w3schools.com/w3images/jane.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  margin: 0 auto;
  position: relative;
}

#hero-text-container {
  position: absolute;
  top: 33%;
}

#hero-text-container > h2 {
  padding: 25px;
  font-size: 52px;
  color: white;
}

#hero-text-container > h1 {
  font-size: 96px;
  padding: 25px;
  color: white;
}

#hero-text-container > h2 > a{
  text-decoration: none;
  background: rgba(65, 65, 65, 0.699);
  color: white;
  padding: 15px;
}


/* Blog */
#blog {
  height: auto;
  width: 80%;
  margin: 0 auto;
}

#blog-content {
  display: flex;
  flex-wrap: wrap;
}

#main-content {
  width: 60%;
  height: 100%;
}

.card {
  margin: 25px;
  width: 100%;
  background: white;
  height: 100%;
}

.card > h1,
.card > h3 {
  text-align: center;
  padding: 10px 0;
}

.card > img {
  width: 90%;
  height: auto;
  margin: 0 5%;

}

.card > p {
  padding: 25px 10px;
}

#side-content {
  width: 35%;
  height: auto;
  margin: 0 1.5%;
}

.side-card { 
  margin: 25px;
  width: 100%;
  background: black;
  color: white;
}

.side-card img {
  width: 100%;
}

.side-card > h2,
.side-card > p {
  padding: 10px;
}

@media (max-width: 768px) {
  header {
    width: 100%;
    margin: 0;
  }

  nav > ul > li {
    margin: 0 10px;
  }

  #hero {
    width: 100%;
    margin: 0;
  }

  #hero-text-container > h2 {
    font-size: 42px;
  }
  
  #hero-text-container > h1 {
    font-size: 76px;
  }

  #blog {
    height: auto;
    width: 100%;
    border: none;
  }
  
  #blog-content {
    display: block;
  }
  
  #main-content {
    width: 100%;
    height: 100%;
  }

  #side-content {
    margin-top: 20px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
  }

  .card {
    margin: 0;
    width: 100%;
    background: white;
    height: 100%;
  }

  .card > img {
    width: 100%;
    height: auto;
    margin: 0;
  }

  .side-card { 
    margin: 0;
    padding: 0;
    width: auto;
  }

  .side-card > img {
    width: 100%;
    height: auto;
  }
}
.jo{
  font-weight: bold;
}
              
            
!

JS

              
                
              
            
!
999px

Console