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

              
                <p>This is some page contents.</p> <p>This is some page contents.</p>
<p>This is some page contents.</p> <p>This is some page contents.</p> 


<ul id="stickymenu" class="solidblockmenu">
<li><a href="http://www.dynamicdrive.com/">Home</a></li>
<li><a href="http://www.dynamicdrive.com/style/" class="current">CSS Examples</a></li>
<li><a href="http://www.dynamicdrive.com/forums/">Forums</a></li>
<li><a href="http://tools.dynamicdrive.com">Webmaster Tools</a></li>
<li><a href="http://www.javascriptkit.com/">JavaScript</a></li>
<li><a href="http://www.cssdrive.com">Gallery</a></li>

</ul>

<h3>A pure CSS sticky menu using CSS "<code>positon:sticky</code>". The target element also has a <code>top</code> property defined to tell the browser how to position the menu when it's sticky. Without it the menu will behave like a regular relatively positioned element.</h3>

<p>Menu works in IE Edge and all modern browsers.</p>

<hr />


<p>This is some page contents.</p> <p>This is some page contents.</p> 
<p>This is some page contents.</p> <p>This is some page contents.</p> 

<div style="height:1000px"></div>
              
            
!

CSS

              
                body{
	padding: 0;
	margin: 0;
}

p{
	margin: 10px;
}

.solidblockmenu{
	margin: 0;
	padding: 0;
	float: left;
	font: bold 14px Arial;
	width: 100%;
	overflow: hidden;
	top: 0;
	position: sticky;
	margin-bottom: 1em;
	border: 1px solid #625e00;
	background: black;
	border-width: 1px 0;
}


.solidblockmenu li{
	display: inline;
}

.solidblockmenu li a{
	float: left;
	color: white;
	padding: 12px 11px;
	text-decoration: none;
	border-right: 1px solid white;
}

.solidblockmenu li a:visited{
	color: white;
}

.solidblockmenu li a:hover, .solidblockmenu li .current{
	color: white;
	background: darkred;
}
              
            
!

JS

              
                
              
            
!
999px

Console