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

              
                <head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
</head>

<body>

  <header>
    <!--navbar controller icon-->
    <a href="#"> <img class="logo" src="https://image.flaticon.com/icons/png/128/860/860168.png"  alt="logo"></a>

    <nav>
      <ul>
        <!--navbar buttons-->
        <!--y button-->
        <li class="button-one"><a href="#">About</a></li>
        <!--x button-->
        <li class="button-two"><a href="#">Projects</a></li>
        <!--a button-->
        <li class="button-three"><a href="#l">Blog</a></li>
        <!--b button-->
        <li class="button-four"><a href="#l">Contact</a></li>
      </ul>
    </nav>

  </header>
  
  <div id="snes-box"> 
    <img src="http://www.retrogamer.net/wp-content/uploads/2013/12/SNES-pad.png" alt="console" id="snes">
  </div>
  
</body>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
}


/*header styling*/
header {
    background-color: #D3D3D9; 
    display: flex; 
    justify-content: flex-start;
    align-items: center;
    padding: 10px 5px;
  }

    /*icon sizing*/
 header img {
   width:52px; 
   height:52px; 
  }

/*nav button styling*/
nav ul { 
  list-style: none; 
    }

 nav ul li {
        display: inline-block;
        text-transform: uppercase;
        font-family: 'Press Start 2P', cursive;
        font-size: 1.5vh;
    }

nav ul li a {
  text-decoration: none;
  color: #fff;
}

/*about button*/
.button-one {
  background-color: #3BB273;
  padding: 10px 2px;
  border-radius: 10%;
  box-shadow: -3px 3px 3px #339963;
  }

/*projects button*/
.button-two {
  background-color: #4D9DE0;
  padding: 10px 2px;
  border-radius: 10%;
  box-shadow: -3px 3px 3px #2F8DDA;
  }

/*blog button*/
.button-three {
  background-color: #E15554;
  padding: 10px 2px;
  border-radius: 10%;
  box-shadow: -3px 3px 3px #DA2F2F;
  }

/*contact button*/
.button-four {
  background-color: #E1BC29;
  padding: 10px 2px;
  border-radius: 10%;
  box-shadow: -3px 3px 3px #C4A31C;
  }

/*button click hover effect*/
nav ul li:hover {
  transform: scale(.9, .9);
}

/*animation for icon*/
.logo:hover {
    animation: rumble 0.3s linear;
}

@keyframes rumble {
    25% {transform: rotate(10deg);}
    75% {transform: rotate(-20deg);}
}

#snes-box {
  text-align: center;
  margin-right: 100px;
}

  #snes {
    width: 70%;
    height: 70%;
    margin: 0px auto;
  }

@media only screen and (min-width: 768px) {

    header {
        justify-content: space-between;
  }
 
  header img {
    padding-left: 10px;
    width: 56px;
    height:66px;
    }

nav ul li {
  padding: 10px 15px;
  margin-right: 20px;
  font-size: 1em;
  }

@media only screen and (min-width: 1024px) {

header {
  justify-content: space-between;
  }

header img {
  padding-left: 20px;
  width: 72px;
  height: 82px;
  }
    
nav li {
  padding: 10px 15px;
  margin-right: 20px;
  font-size: 1.2em;
  }
  

              
            
!

JS

              
                
              
            
!
999px

Console