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

              
                <div id="page-wrap">
  <div class="container">
    <h1>How to create a simple 'Under the Rug' footer</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quae cum essent dicta, finem fecimus et ambulandi et disputandi. Audax negotium, dicerem impudens, nisi hoc institutum postea translatum ad philosophos nostros esset. Suo enim quisque studio maxime ducitur. Sed ne, dum huic obsequor, vobis molestus sim. Duo Reges: constructio interrete. Num igitur utiliorem tibi hunc Triarium putas esse posse, quam si tua sint Puteolis granaria? Invidiosum nomen est, infame, suspectum. Expressa vero in iis aetatibus, quae iam confirmatae sunt. </p>
    <h2>Quid iudicant sensus?</h2>
    <p>Cum autem in quo sapienter dicimus, id a primo rectissime dicitur. Quasi vero, inquit, perpetua oratio rhetorum solum, non etiam philosophorum sit. Quis Aristidem non mortuum diligit? Illa sunt similia: hebes acies est cuipiam oculorum, corpore alius senescit; Sin autem eos non probabat, quid attinuit cum iis, quibuscum re concinebat, verbis discrepare? Quid igitur, inquit, eos responsuros putas? </p>
    <p>Summus dolor plures dies manere non potest? Esse enim quam vellet iniquus iustus poterat inpune. Conferam tecum, quam cuique verso rem subicias; Nam quid possumus facere melius?   <code>Stoici scilicet.</code> Nos paucis ad haec additis finem faciamus aliquando; In qua si nihil est praeter rationem, sit in una virtute finis bonorum; Igitur neque stultorum quisquam beatus neque sapientium non beatus. Primum Theophrasti, Strato, physicum se voluit; </p>
    <h3>Quid in isto egregio tuo officio et tanta fide-sic enim existimo-ad corpus refers?</h3>
  </div>
</div>
<footer id="footer">
  <div class="container">
    <p>Odium autem et invidiam facile vitabis. Nihil illinc huc pervenit. <code>At enim sequor utilitatem.</code> Potius inflammat, ut coercendi magis quam dedocendi esse videantur. Hoc loco tenere se Triarius non potuit. Cur iustitia laudatur? </p>
    <pre>Neminem videbis ita laudatum, ut artifex callidus comparandarum voluptatum diceretur. Atque ego: Scis me, inquam, istud idem sentire, Piso, sed ate opportune facta mentio est.</pre>
    <p>Apud imperitos tum illa dicta sunt, aliquid etiam coronae datum; <code>Quonam, inquit, modo?</code> Ipse Epicurus fortasse redderet, ut Sextus Peducaeus, Sex. <code>Sed ego in hoc resisto;</code> Quis non odit sordidos, vanos, leves, futtiles? At iste non dolendi status non vocatur voluptas. Hoc est non dividere, sed frangere. Et quidem Arcesilas tuus, etsi fuit in disserendo pertinacior, tamen noster fuit; </p>
  </div>
</footer>


              
            
!

CSS

              
                @import "compass/css3";

.container{
  max-width:1200px;
  width:100%;
  margin:0 auto;
  padding:1em 0 2.5em;
}

#page-wrap{ 
  width:100%;
	z-index:100; 
	position:relative; 
	@include box-shadow(rgba(0,0,0, .35) 0 2px 7px);
  background:white;
}

#footer{
  position:fixed;
	width:100%;
	bottom:0;
	left:0;
	z-index:0;
  background:black;
  color:white;
}
              
            
!

JS

              
                jQuery(document).ready(function($){
  // Resize pages based on viewports initial size
	detectViewport();

	// Rezise pages according to viewport resize
	$(window).on('resize', function(){
		detectViewport();
	});
});

//Add the appropriate CSS to #page-wrap when the viewport is adjusted
function detectViewport(){
	var footerHeight = $('#footer').height();
	var viewportHeight = $(window).height();
	$('#page-wrap').css("margin-bottom", footerHeight);
	$('#page-wrap').css("min-height", viewportHeight);
}
              
            
!
999px

Console