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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <body>
    <div id="page">
        <dl class="tabs">
            <dt class="selected">Tab 1</dt>
            <dd class="selected">
                <div class="tab-content">
                    Suspendisse eleifend nisi at ante. Phasellus euismod vestibulum nisl. Donec est mi, ultrices eget, feugiat at, pretium vitae, est. Aliquam a leo at massa dapibus consectetur. Sed eu arcu. In et felis. Cras vel justo egestas lectus tincidunt blandit. Vestibulum
                    eu tellus non ipsum tristique adipiscing. Proin rhoncus ipsum id lorem. Etiam vulputate lectus ut urna. Nullam leo nisi, lacinia sit amet, eleifend sed, ornare sit amet, velit. Curabitur consequat est. Nullam nunc ligula, faucibus
                    non, lacinia vel, lacinia et, mauris. Etiam pharetra cursus tellus. Proin vehicula.
                </div>
            </dd>

            <dt>Tab 2 with long name</dt>
            <dd>
                <div class="tab-content">
                    Aenean vitae eros. In eget massa. Donec malesuada. Sed accumsan tempus nunc. Sed neque nunc, fringilla quis, pharetra ut, feugiat a, justo. Nam ac ligula. Vestibulum eros magna, porta non, tristique quis, ultricies a, arcu. Integer condimentum lorem sit
                    amet mauris. Morbi velit felis, tincidunt sed, auctor at, tincidunt et, magna. Aenean laoreet ultrices felis. Aliquam vehicula urna ac odio. Phasellus pulvinar, sem a pretium scelerisque, orci massa consectetur lacus, eget fringilla
                    felis diam at ligula. Donec sodales lacus ut erat. Nunc mattis diam id lorem. Sed laoreet neque id diam. Mauris et sapien. Etiam tellus enim, gravida ac, accumsan semper, malesuada et, tellus. Ut mattis velit eu ante.
                </div>
            </dd>

            <dt>Tab 3</dt>
            <dd>
                <div class="tab-content">
                    Nulla accumsan. Aenean purus sapien, pharetra a, placerat id, egestas sed, diam. Phasellus in enim. In sollicitudin nibh ac nulla. Donec et justo in nibh molestie tincidunt. Mauris porttitor risus ac enim. Nunc mattis eros ut risus. Donec ultricies euismod
                    nibh. Mauris faucibus tempus elit. In posuere tristique lorem. Curabitur enim velit, porttitor in, tristique at, cursus ac, enim. Maecenas varius, eros eu consectetur imperdiet, nisl justo luctus tellus, at volutpat diam felis et velit.
                </div>
            </dd>

            <dt>Tab 4</dt>
            <dd>
                <div class="tab-content">
                    Sed eu arcu. In et felis. Cras vel justo egestas lectus tincidunt blandit. Vestibulum eu tellus non ipsum tristique adipiscing. Proin rhoncus ipsum id lorem. Etiam vulputate lectus ut urna. Nullam leo nisi, lacinia sit amet, eleifend sed, ornare sit amet,
                    velit. Curabitur consequat est. Nullam nunc ligula, faucibus non, lacinia vel, lacinia et, mauris. Etiam pharetra cursus tellus. Proin vehicula.
                </div>
            </dd>

            <dt>Tab 5</dt>
            <dd>
                <div class="tab-content">
                    Nam ac ligula. Vestibulum eros magna, porta non, tristique quis, ultricies a, arcu. Integer condimentum lorem sit amet mauris. Morbi velit felis, tincidunt sed, auctor at, tincidunt et, magna. Aenean laoreet ultrices felis. Aliquam vehicula urna ac odio.
                    Phasellus pulvinar, sem a pretium scelerisque, orci massa consectetur lacus, eget fringilla felis diam at ligula. Donec sodales lacus ut erat. Nunc mattis diam id lorem. Sed laoreet neque id diam. Mauris et sapien. Etiam tellus enim,
                    gravida ac, accumsan semper, malesuada et, tellus. Ut mattis velit eu ante.
                </div>
            </dd>
        </dl>
    </div>
</body>
            
          
!

CSS

            
              body {
				background:#fff;
				color:#000;
				font-family:sans-serif;
				line-height:1.6;
			}
			
			#page {
				width:70%;
				margin:10px auto;
			}
			
			
			.tabs {
				width:100%;
				overflow:hidden;
				font-size:0.9em;
				margin:2em 0;
				zoom:1;
				padding:1px;
				position:relative;
			}
			
			.tabs dt {
				float:left;
				line-height:2;
				height:2em;
				background:#e8f0f5;
				border:1px solid #e8f0f5;
				border-bottom:0;
				padding:0 1em;
				position:relative;
				left:35px;
				margin-right:1px;
				cursor:pointer;
				
				-webkit-border-top-left-radius:10px;
				-webkit-border-top-right-radius:10px;
				-moz-border-radius-topleft:10px;
				-moz-border-radius-topright:10px;
			}
			
			.tabs dt:hover {
				background-color:#bfdff4;
			}
			
			.tabs dt.selected {
				border-color:#b0d0e9;
				background:#fff;
				z-index:3;
				cursor:auto;
			}
			
			.tabs dd {
				background:#fff;
				display:none;
				float:right;
				width:100%;
				margin:2em 0 0 -100%;
				position:relative;
				z-index:2;
			}
			
			.tabs dd.selected {
				display:block;
			}
			
			.tabs .tab-content {
				border:1px solid #b0d0e9;
				padding:20px;
				
				-webkit-border-radius:20px;
				-moz-border-radius:20px;
			}
            
          
!

JS

            
              jQuery(document).ready(function($){
    $( 'dl.tabs dt' ).click( function() {
$( this ).siblings().removeClass( 'selected' ).end().next( 'dd' ).addBack().addClass( 'selected' );
} );
});
            
          
!
999px

Console