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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                	<div class="horizontalmenubar">

		<label for="show-menu" class="show-menu">MAIN MENU</label>
		
		<input type="checkbox" id="show-menu" role="button">

		<ul id="menu"> <!-- removed id="menu" -->

			<li><a href="#">Dashboard</a>
				<!-- <ul class="hidden">
					<li><a href="#">SUB MENU OPTION</a></li>
					<li><a href="#">SUB MENU OPTION</a></li>
				</ul>-->
			</li>
		
			<li>
				<a href="#">H MENU OPTION</a>
				<!-- <ul class="hidden">
					<li><a href="#">SUB MENU OPTION</a></li>
					<li><a href="#">SUB MENU OPTION</a></li>
				</ul>-->
			</li>

			<li>
				<a href="#">H MENU OPTION</a>
				<!-- <ul class="hidden">
					<li><a href="#">SUB MENU OPTION</a></li>
					<li><a href="#">SUB MENU OPTION</a></li>
				</ul>-->
			</li>

			<li><a href="#">H MENU OPTION</a></li>

			<li><a href="#">H MENU OPTION</a></li>
		</ul>
	</div>

	<div class="clear"></div>

    <div id="div_lhs_menu">

	    <ul class="js-css-menu responsive vertical">
	      <li><a href="#overalldivcalendartable">Calendar</a>
	      	<!--<div>

	          <ul>
	            <li><b>Col 1</b></li>
	            <li><a href="#">Sublink 1</a></li>
	            <li><a href="#">Sublink 2</a></li>
	            <li><a href="#">Sublink 3</a></li>
	          </ul>

	          <ul>
	            <li><b>Col 1</b></li>
	            <li><a href="#">Sublink 1</a></li>
	            <li><a href="#">Sublink 2</a></li>
	            <li><a href="#">Sublink 3</a></li>
	          </ul>
	        </div> -->

	      </li>
	      
	      <li><a href="#">Dboard option 2</a>
	      	<!--<div>

	          <ul>
	            <li><b>Col 1</b></li>
	            <li><a href="#">Sublink 1</a></li>
	            <li><a href="#">Sublink 2</a></li>
	            <li><a href="#">Sublink 3</a></li>
	          </ul>

	          <ul>
	            <li><b>Col 1</b></li>
	            <li><a href="#">Sublink 1</a></li>
	            <li><a href="#">Sublink 2</a></li>
	            <li><a href="#">Sublink 3</a></li>
	          </ul>
	        </div> -->
	      </li>

	      <li><a href="#">Dboard option 3</a>
	      	<!--<div>

	          <ul>
	            <li><b>Col 1</b></li>
	            <li><a href="#">Sublink 1</a></li>
	            <li><a href="#">Sublink 2</a></li>
	            <li><a href="#">Sublink 3</a></li>
	          </ul>

	          <ul>
	            <li><b>Col 1</b></li>
	            <li><a href="#">Sublink 1</a></li>
	            <li><a href="#">Sublink 2</a></li>
	            <li><a href="#">Sublink 3</a></li>
	          </ul>
	        </div> -->
	      </li>
	    </ul>
    </div>

    <!-- JS targets this div -->
	<div id="overalldivcalendartable">
		<table>
		   <thead>
		  <tr>
		    <th>m</th>
		    <th>t</th>
		    <th>w</th>
		    <th>t</th>
		    <th>f</th>
		    <th>s</th>
		    <th>s</th>
		  </tr>
		  </thead>

		  <tbody>
				  <tr>
				    <td></td>
				    <td></td>
				    <td>1</td>
				    <td>2</td>
				    <td>3</td>
				    <td>4</td>
				    <td>5</td>
				  </tr>
				  <tr>
				    <td>6</td>
				    <td>7</td>
				    <td>8</td>
				    <td>9</td>
				    <td>10</td>
				    <td>11</td>
				    <td>12</td>
				  </tr>
				  <tr>
				    <td>13</td>
				    <td>14</td>
				    <td>15</td>
				    <td>16</td>
				    <td class="selected">17</td>
				    <td>18</td>
				    <td>19</td>
				  </tr>
				  <tr>
				    <td>20</td>
				    <td>21</td>
				    <td>22</td>
				    <td>23</td>
				    <td>24</td>
				    <td>25</td>
				    <td>26</td>
				  </tr>
				  <tr>
				    <td>27</td>
				    <td>28</td>
				    <td>29</td>
				    <td>30</td>
				    <td>31</td>
				  </tr>
		  </tbody>
		</table>
	</div>

              
            
!

CSS

              
                .horizontalmenubar {
	margin-top: 86px;
	background: #33DD00;
}

/*Strip the ul of padding and list styling*/
.horizontalmenubar ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

/*Create a horizontal list with spacing*/
.horizontalmenubar li {
	display:inline-block;
	float: left;
	margin-right: 2px;
	width: 200px;
}

/*Style for menu links*/
.horizontalmenubar li a {
	display: block;
	text-align: center;
	line-height: 50px;
	color: #000000;
	background: #D6D6D6;
	text-decoration: none;
}

/*Hover state for top level links*/
.horizontalmenubar li:hover a {
	background: #F5F5F5;
	color: #3366FF;
	border-bottom: 1px solid #000000;
}

/*Hide dropdown links until they are needed*/
.horizontalmenubar li ul {
	display: none;
}

/*Make dropdown links vertical*/
.horizontalmenubar li ul li {
	display: block;
	float: none;
}

/* Style the <a> tag nested in sub-menus */
.horizontalmenubar li ul li a {
	padding: 0 5px 0 5px;
	line-height: 25px;	
}

/* Style the hovering of the <a> tag nested in sub-menus */
.horizontalmenubar li:hover ul li a {
	background: #D6D6D6;
	color: #000000;	
}

/* Style the hovering of the <a> tag nested in sub-menus */
.horizontalmenubar li ul li a:hover {
	background: #F5F5F5;
	color: #3366FF;	
}

/*Display the dropdown on hover*/
.horizontalmenubar ul li a:hover + .hidden, .hidden:hover {
	display: block;
}

/*Style 'show menu' label button and hide it by default*/
.show-menu {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	text-decoration: none;
	color: #000000;
	background: #D6D6D6;
	text-align: center;
	padding: 10px 0;
	display: none;
	font-weight: bold;
	font-size: 20px;
}

/*Hide checkbox*/
.horizontalmenubar input[type=checkbox]{
    display: none;
}

/*Show menu when invisible checkbox is checked*/
.horizontalmenubar input[type=checkbox]:checked ~ #menu{
    display: block;
}

/*Responsive Styles*/
@media screen and (max-width : 760px){
	/*Make dropdown links appear inline*/
	.horizontalmenubar ul {
		position: static;
		display: none;
	}

	/*Create vertical spacing*/
	.horizontalmenubar li {
		margin-bottom: 1px;
	}

	/*Make all menu links full width*/
	.horizontalmenubar ul li, li a {
		width: 100%;
	}

	/*Display 'show menu' link*/
	.show-menu {
		display:block;
	}
}

/* LHS div */
#div_lhs_menu {
	margin: 10px;
	display: inline;
}

/* Main menu */
.js-css-menu {
  display: inline-block;
}

.js-css-menu, .js-css-menu ul, .js-css-menu li {
  list-style: none; 
  padding: 0; 
  margin: 0;
}

.js-css-menu a {
  text-decoration: none;
}

.js-css-menu > li {
  display: inline-block; 
  float: left;
  margin-top: 2px;
  background-color: #D6D6D6;
}

.js-css-menu > li > a {
  color: #000000; 
  display: block;
  padding: 10px 15px;
}

.js-css-menu > li:hover > a {
  background: #F5F5F5;
  color: #3366FF;
}

/* Dropdown */
.js-css-menu > li div {
  position: absolute; 
  display: none;
  background: #D6D6D6;
}

.js-css-menu > li:hover div {
  display: block;
}

.js-css-menu > li div ul {
  float: none;
}

.js-css-menu > li div ul li {
  padding: 10px 15px;
  margin-bottom: 2px;
}

.js-css-menu > li div ul li:hover {
  background: #FFFFFF;
  color: #407D94; 
}


.js-css-menu.vertical > li {
  display: block; 
  float: none; 
  position: relative;
}

.js-css-menu.vertical > li div {
  width: 150px; 
  top: 0;
  left: 181px; /* Adjust the left value according to the width of the vertical menu */
}

.js-css-menu.vertical > li div ul li:hover {
  background: #FFFFFF;
  color: #407D94;
}

.js-css-menu.vertical > li div ul li a {
  color: #555;
}

/*Responsive Styles*/
@media screen and (max-width : 760px){
	/* LHS div */
	#div_lhs_menu {
		margin: 10px 0 0 0;
	}

	/* Vertical */
	.js-css-menu.vertical {
	  width: 100%; /* Adjust the width of the vertical menu */
	}
}

/* 
Generic Styling, for Desktops/Laptops 
*/
table { 
  border-collapse: collapse; 
}
/* Zebra striping */
tr:nth-of-type(odd) { 
  background: #eee; 
}

th { 
  background: #333; 
  color: white; 
  font-weight: bold; 
  padding: 6px; 
  border: 1px solid #ccc; 
}

td { 
  padding: 6px; 
  border: 1px solid #ccc; 
  height: 100px;
  width: 150px;

}

#overalldivcalendartable {
	display: inline-block;
	float: none;
}

/* 
Max width before this PARTICULAR table gets nasty
This query will take effect for any screen smaller than 760px
and also iPads specifically.
*/
@media screen and (max-width : 760px) {

	#overalldivcalendartable {
	   clear: both;
	   margin-top: 10px;
	}

	td, th { 
	  padding: 6px; 
	  border: 1px solid #ccc; 
	  text-align: left;
	  height: 50px;
	  width: 100px;
	}
}
              
            
!

JS

              
                
              
            
!
999px
How do you comfort a JavaScript bug? You console it!

Console