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

              
                <header>
	
	<div id="actual-nav">
		<img src="https://cdn2.hubspot.net/hub/145335/file-1353695605-jpg/impact-nav-714.jpg">
	</div>
	
	<div id="subscribe-form-header">
		<i class="glyphicon glyphicon-remove"></i>
		<div class="row">
			<div class="col-lg-7">
				<div class="float-left">
					<img src="https://cdn2.hubspot.net/hub/145335/file-443040931-png/impactbnd-COS/Apple_Icons/inbound-marketing-logo-appleicon-144.png?t=1406724967264" alt="Inbound Marketing Blog - IMPACT">
				</div>
				<div class="float-left">
					<h3>Get our award-winning marketing insights daily</h3>
					<p>Named Best Inbound Content by HubSpot</p>
				</div>
			</div>
			<div class="col-lg-5">
        <form accept-charset="UTF-8" enctype="multipart/form-data" id="" class="hs-form stacked" action="#" method="POST" novalidate="novalidate">
          <div class="hs_email field hs-form-field">
            <div class="input">
              <input class="hs-input" type="email" required="required" id="email-177b1c7f-ced6-44f6-922f-65d8263223e8" name="email" value="bkane@impactbnd.com" placeholder="Enter your email address...">
            </div>
          </div>
          <div class="hs_blog_the_impact_blog_subscription field hs-form-field" style="display: none;">
            <div class="input">
              <input class="hs-input" type="hidden" name="blog_the_impact_blog_subscription" value="instant">
            </div>
          </div>
          <div class="hs_submit">
            <div class="actions">
              <input class="hs-button primary large" type="submit" value="Subscribe">
            </div>
          </div>
        </form>
			</div>
		</div>
	</div>

</header>
              
            
!

CSS

              
                @import "bourbon";

header {
  border-bottom:1px solid #ddd;
  width:100%;
  
  #actual-nav {
    width:100%;
    
    &.hidden-nav {
			display:none;
		}
    
    img {
      margin:0 auto;
      display:block;
    }
  }

  #subscribe-form-header {
      display:none;
      max-width:1170px;
      margin:0 auto;
      height:90px;
      overflow:hidden;
      padding:15px 20px;
    
      &.show {
        display:block
      }

      .glyphicon-remove {
        position: absolute;
        right: 60px;
        top: 30px;
        color: #666;
        cursor:pointer;
      }

      .float-left {
        float:left;
        margin-right:30px;

        &:after{
          content:'';
          display:block;
        }

        &.form {
          margin-right: 0px;
        }
      }

      h3 {
        margin:5px 0 0 0;
        font-family: merriweather;
        font-size:20px;
        color:#555;
      }

      p {
        font-family: merriweather;
        font-size:16px;
        color: #555;
      }

      img {
        text-align: center;
        max-height:60px;
      }

      .span5 {
        margin:9px 0;
      }

      form {
        margin-bottom: 0px!important;

        .hsformerror {
          top:auto!important;
          bottom:-60px!important;

          em {
            border-color: transparent transparent #fdd2d0!important;
            top:-20px!important;
            bottom:auto!important;
          }
        }

        label {
          display:none!important;
        }

        .hs-form.stacked .field {
          margin-bottom: 0px !important;
        }

        input {
          font-family: merriweather!important;
          font-size:16px!important;
          padding:20px!important;
          margin-bottom:0px!important;
          
          outline:none;
          box-shadow:none;
          border-radius:3px;
          border:1px solid #ccc;
          width:100%;
        }

        .hs_submit {
          position: absolute;
          top: 0px;
          right: 0px;

          .actions {

            input {
              padding: 22px 30px!important;
              font-family: proxima-nova !important;
              text-transform: uppercase;
              letter-spacing: 2px;
              background:green;
              color:#fff;
              border:none;
              -webkit-font-smoothing: antialiased;

              border-radius:0px 3px 3px 0px;
            }
          }
        }
      }
    }
  
}
              
            
!

JS

              
                setTimeout(function(){
  $("header").fadeTo('fast', 0.5, function() {
    $(this).css("background","#d4eefb");
  }).fadeTo('fast', 1);
  $("#actual-nav").fadeOut("fast", function(){
    $(this).addClass("hidden-nav");
  });
},2000);

setTimeout(function(){
  $("#subscribe-form-header").fadeIn("fast", function(){
    $(this).addClass("show");
  });
},2250);

$("#subscribe-form-header .glyphicon-remove").click(function(){
    $("#subscribe-form-header").fadeOut("fast", function(){
      $(this).removeClass("show");
    });
    $("header").fadeTo('fast', 0.5, function() {
        $(this).css("background","#ffffff");
    }).fadeTo('fast', 1);
    setTimeout(function(){
      $("#actual-nav").fadeIn("fast", function(){
          $(this).removeClass("hidden-nav");
      });
    },250);
});

              
            
!
999px

Console