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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container-fluid background-image">
  <div id="navbar">
   <div class="dropdown" style=float:right>
     <button class="dropbtn"><i class="fa fa-bars"></i></button>
     <div class="dropdown-content">
       <a href="#connect">connect</a>
       <a href="#portfolio">portfolio</a>
       <a href="#about">about</a>
     </div>
   </div>
   <a href="#connect">connect</a>
   <a href="#portfolio">portfolio</a>
   <a href="#about">about</a>
  </div>
  <div class="fira-font"><header class="section-title" id="about">ABOUT ME</header><p style="background-color: white; color: black">Hi there! I'm a current Software Engineering student at Arizona State Universtiy and also learning via <a href='https://www.freecodecamp.org/adaakal'> freeCodeCamp</a> and <a href='https://www.hackerrank.com'>HackerRank</a>. My goal is to become an expert in both the Front-end and Back-end.
    </p>
  </div>
  <div class="fira-font"><header class="section-title" id="portfolio">PORTFOLIO</header><div class="gallery">
  <a target="_blank">
    <img src="http://res.cloudinary.com/adaakal/image/upload/v1523502801/tributePage.png" alt="Tribute Page First Draft" width="200" height="150">
  </a>
  <div class="picDescrip">Tribute Page First Draft</div>
</div><div class="gallery">
  <a target="_blank">
    <img src="http://res.cloudinary.com/adaakal/image/upload/v1523505182/blankScreen.png" alt="Blank Picture" width="400" height="400">
  </a>
  <div class="picDescrip">Coming Soon</div>
</div><div class="gallery">
  <a target="_blank">
    <img src="http://res.cloudinary.com/adaakal/image/upload/v1523505182/blankScreen.png" alt="Blank Picture" width="400" height="400">
  </a>
  <div class="picDescrip">Coming Soon</div>
</div></div>
  <div class="fira-font"><header class="section-title" id="connect">CONNECT</header></div>
  <div>
  <form action="/action_page.php">
    <label class="fira-font" for="name">Name</label><input type="text" id="name" name="firstlastname" placeholder="Your name.."><label class="fira-font" for="email">E-mail</label><input type="text" id="email" name="email" placeholder="E-mail.."><label class="fira-font" for="phonenumber">Phone Number</label><input type="text" id="number" name="phonenumber" placeholder="Phone Number.."><div class="fira-font">Message<textarea></textarea></div>
<input type="send" id="send" name="sendbtn" value="Send"> 
   </div>

  

</div>
              
            
!

CSS

              
                body {
  background-color: rgb(233, 235, 235);
}

.background-image {
    width: 100%;
    height: 500px;
    background-image: url("https://s7.postimg.org/pwyj6pgrv/kari-shea-272383-unsplash.jpg");
    background-size: cover;
    opacity: .85;
    background-position: center;
}
.fira-font{
  font-family: 'Fira Sans', sans-serif;
}
/* Style the navbar */
#navbar {
  overflow: hidden;
  background-color: white;
}

/* Navbar links */
#navbar a {
  float: right;
  display: block;
  color: black;
  text-align: center;
  padding: 14px;
  text-decoration: none;
}

/* Page content */
.content {
  padding: 16px;
}
/*Attempting to change color of navbar content on hover*/
.navbar-content a:hover {background-color: #ddd}

/* The sticky class is added to the navbar with JS when it reaches its scroll position */
.sticky {
  position: fixed;
  top: 0;
  width: 100%
}

/* Add some top padding to the page content to prevent sudden quick movement (as the navigation bar gets a new position at the top of the page (position:fixed and top:0) */
.sticky + .content {
  padding-top: 60px;
}
/* Dropdown btn that includes about, portfolio, connect*/
.dropbtn {
    background-color: #4CAF50;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
}
/*The container <div> needed to position the the dropdown content */
.dropdown {
    position: relative; /*when position 'relative',it doesn't work // when absolute, moves dropdwn to left, but works better*/
    display: inline-block;
}
/*Dropdown content (Hidden by default)*/
.dropdown-content {
    display: none;
    position: relative;/*absolute doesn't work//relative doesn't work well*/
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    /*z-index: 1;*/
    
}
/*Links inside the dropdown menu*/
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

/*Change color of dropdown links on hover*/
.dropdown-content a:hover {background-color: #ddd}

/*Show the dropdown menu on hover*/
.dropdown:hover .dropdown-content {
    display: block;
}

/*Change the background color of the dropdown button when the dropdown content is shown*/
.dropdown:hover .dropbtn {
    background-color: #3e8e41;
}

.section-title{
  color: black;
  text-align: center;
  font-size: 60px;
}
/*Portfolio*/
.gallery {
    margin: 5px;
    border: 5px solid #ccc;
    float: left;
    width: 180px;
}

.gallery:hover {
    border: 1px solid #777;
}

.gallery img {
    width: 100%;
    height: auto;
}

.picDescrip {
    padding: 5px;
    text-align: left;
}

input[type=text], select {
  width: 100%;
  padding: 14px 20px;
  margin: 10px;
  display: inline-block;
  border: 1px solid black;
  border-radius: 4px;
  box-sizing: border-box;
}

input[type=send] {
  width: 100%;
  background-color: #A9A9A9;
  color: black;
  padding: 14px 20px;
  margin: 10px 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;  
}

input[type=send]:hover {
  background-color: #F0FFFF
}

textarea {
  width: 100%;
  height: 150px;
  padding: 14px 20px;
  margin: 10px;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: #f8f8f8;
  font-size: 16px;
  resize: none;
}
              
            
!

JS

              
                // When the user scrolls the page, execute myFunction 
window.onscroll = function() {
  myFunction()
};

// Get the navbar
var navbar = document.getElementById("navbar");

// Get the offset position of the navbar
var sticky = navbar.offsetTop;

// Add the sticky class to the navbar when you reach its scroll position. Remove "sticky" when you leave the scroll position
function myFunction() {
  if (window.pageYOffset >= sticky) {
    navbar.classList.add("sticky")
  } else {
    navbar.classList.remove("sticky");
  }
}
              
            
!
999px

Console