Pen Settings



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


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


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.


                <div class="container">
	<div class="page-header">
		<h1>Super Simple Column Resizing</h1>
	<p class="lead"><b>Click &amp; drag</b> column headers to resize columns. <b>Double click</b> table head to reset column widths.</p>
	<table class="table table-striped table-bordered table-resizable">
			<td>Nitro Cowabunga</td>
			<td>1600 Pennsylvania Ave, Washington DC</td>
			<td>Bandolier Uppercuts</td>
			<td>Pokemon Trainer</td>
			<td>1 Infinite Loop, Cupertino, California</td>
			<td>Corgi Nyquist</td>
			<td>Sea Captain</td>
			<td>245819637.001 Popcicle Circle Apartment 54634354, Hastings, Nebraska</td>
			<td>Kombucha Bonzai</td>
			<td>3051 Van Brunt Boulevard, Kansas City, Missouri</td>
	<p>Based on <a href=""></a></p>



                .table-resizable {
	&.resizing {
		cursor: col-resize;
		user-select: none;
	th {
		position: relative;

		// Show resize curson when hovering over column borders
		&::before {
			@extend .table-resizable.resizing;
			content: '';
			display: block;
			height: 100%;
			position: absolute;
			right: 0;
			top: 0;
			width: 1em;

		&:last-of-type::before {
			display: none;

	// Add `th` to the selector below to allow shrinking a column all the way
	td {
		max-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;


                $(function() {
	var startX,
		 pressed = false;
		mousemove: function(event) {
			if (pressed) {
				$handle.width(startWidth + (event.pageX - startX));
		mouseup: function() {
			if (pressed) {
				pressed = false;
	}).on('mousedown', '.table-resizable th', function(event) {
		$handle = $(this);
		pressed = true;
		startX = event.pageX;
		startWidth = $handle.width();
		$table = $handle.closest('.table-resizable').addClass('resizing');
	}).on('dblclick', '.table-resizable thead', function() {
		// Reset column sizes on double click
		$(this).find('th[style]').css('width', '');