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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <!DOCTYPE html>
<html>
  <head>
    <title>Cat Site | A Site About Cats</title>
    <!--		<link rel="stylesheet" href="css/style.css"> -->
  </head>
  <body>

    <div class="super-container">
      <div class="container">
        <div class="col col-two-thirds">
          <!--					<img src="https://s21.postimg.org/wpaw9pbsn/banner_cat.png" alt="email a cat">-->
          <div class="header">
            <h1>Liroem ipsum</h1>
            <h2>Slogan goes here</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
          </div>
          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi volutpat libero fringilla, bibendum erat ac, tincidunt eros. Pellentesque in sem quis velit porta semper. Nulla vitae dictum libero.</p>
          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi volutpat libero fringilla, bibendum erat ac, tincidunt eros. Pellentesque in sem quis velit porta semper. Nulla vitae dictum libero.</p>
          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi volutpat libero fringilla, bibendum erat ac, tincidunt eros. Pellentesque in sem quis velit porta semper. Nulla vitae dictum libero.</p>
        </div><!--end column1-->
        <div class="col col-one-third form-area">
          <form class='main-form' id='main-form'>
            <legend>Fill out the form below</legend>
            <input type="text" id="first_name" name="first_name" placeholder="first name" required>
            <input type="text" id="last_name" name="last_name" placeholder="last name" required>
            <input type="email" id="email" name="user_email" placeholder="email">
            <button type="submit" class='btn-submit'>Submit</button>
          </form>
          <!--might want to turn this into a button with the image-->
        </div><!--end column2 -->
        <footer>
          <hr>
          <p>&copy; Copyright 2015. All Rights Reserved.<p>
        </footer>
        
      </div><!-- end container -->
      
    </div><!--end super container-->
    
  </body>
</html>

              
            
!

CSS

              
                *{
  box-sizing: border-box;
}

form input::after{
  content:"*";
}
/*issue with this*/

body{
  margin: 0;
  padding: 0;
  background: url('https://s29.postimg.org/h5qmkc3af/background_grad.png') #db9c5d repeat-x;
}

.header{
  background: url('https://s7.postimg.org/3zmenlbzv/banner.jpg') no-repeat;
  width: 100%;
  height: 198px;
  background-size: cover;
  padding-left: 225px;
}



h1{
  color: white;
  text-transform: uppercase;
}


form input {
margin: 5px auto 0;
  display: block;
}

input {
  width: 287px;
  height: 31px;
  /*Would have preferred to use width 80% so the input fields would remain fluid
  */
}

footer {
	text-align: center;
	max-width: 782px;
  margin: 0 auto;
	clear: both;
}
footer hr{
  width: 100%;
  display: block;
}

.super-container{
  width: 100%;
}


.container{
  width: 1024px;
  margin: 0 auto;
}

.col{
  position: relative;
  display: inline-block;
  float: left;
  margin-left: 15px;
  margin-right: 15px;
}
.col-two-thirds{
  width: 640px;
}
.col-one-third{
  width: 320px;
}

img{
  max-width: 100%;
  height: auto;
}

.form-area{
  background: #d8934e;
  height: 500px;
}

.btn-submit{
  background: url('https://s2.postimg.org/ia6nhrrh1/submit.png');
  width: 162px;
  height: 50px;
  border: none;
 border-radius: 0;
  margin: 5px auto;
  display: block;
  text-indent: -9999px;
}

/*.form-area img {
	display: block;
    margin-left: auto;
    margin-right: auto;
}*/

/*form {
	margin: 0 auto;
}
*/
/*.form-area form {
	display: block;
    margin-left: auto;
    margin-right: auto;
}*/



hr{
  width: 80%;
  display: block;
  margin: 0 auto;
}

@media only screen and (max-width : 1024px){
  .container{
    width: 768px;
  } 
  .col-two-thirds{
    width: 480px;
  }
  .col-one-third{
    width: 240px;
  }
  .col{
    margin-left: 10px;
    margin-right: 10px;
  }
}
@media only screen and (max-width : 768px){
  .container{
    width: 480px;
  }
  .col-two-thirds,
  .col-one-third{
    width: 100%;
  }
  .header{
    height: auto;
    padding-left: 125px;
  }
  }
}
@media only screen and (max-width : 480px){
  .container{
    width: 320px;
  }
}
              
            
!

JS

              
                $(function(){
 		 var $mainForm = $('.main-form');
 	// $mainForm.validate();
  
 var $firstName = $('#first_name'),
     $lastName = $('#last_name'),
     $email = $('#email'),
     $submitBtn = $('.btn-submit');
  
  $submitBtn.on('click', function( e ){
    e.preventDefault();
    
    var fnVal = $firstName.val(),
        lnVal = $lastName.val(),
        eVal = $email.val();
    
    if( fnVal == ''){
      alert( 'please fill out the first name' );
    }
    if( lnVal == ''){
      alert( 'please fill out the last name' );
    }
    if( eVal == '' ){
      alert( ' we need your email address' );
    }
    
    if( fnVal && lnVal && eVal ){
      alert( 'Thank you! Your message has been sent!' )
    }
    
    /*if( fnVal == '' || lnVal == '' || eVal == '' ){
      alert( 'please make sure all fields are filled out...' );
    }else{
      alert( 'Your form has been submitted. Thank you!' );
    }*/
    
  } );
  
});
              
            
!
999px
We're stronger <u>nited than <div>ided.

Console