cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <table>
		<thead>
		<tr>
			<th>First Name</th>
			<th>Last Name</th>
			<th>Job Title</th>
			<th>Favorite Color</th>
			<th>Wars or Trek?</th>
			<th>Date of Birth</th>
			<th>Dream Vacation City</th>
			<th>GPA</th>
			<th>Arbitrary Data</th>
		</tr>
		</thead>
		<tbody>
		<tr>
			<td data-title="First Name">James</td>
			<td data-title="Last Name">Matman</td>
			<td data-title="Job Title">Chief Sandwich Eater</td>
			<td data-title="Favorite Color">Lettuce Green</td>
			<td data-title="Wars or Trek?">Trek</td>
			<td data-title="Date of Birth">January 13, 1979</td>
			<td data-title="Dream Vacation City">Gotham City</td>
			<td data-title="GPA">3.1</td>
			<td data-title="Arbitrary Data">RBX-12</td>
		</tr>
		<tr>
		  <td data-title="First Name">The</td>
		  <td data-title="Last Name">Tick</td>
		  <td data-title="Job Title">Crimefighter Sorta</td>
		  <td data-title="Favorite Color">Blue</td>
		  <td data-title="Wars or Trek?">Wars</td>
		  <td data-title="Date of Birth">July 19, 1968</td>
		  <td data-title="Dream Vacation City">Athens</td>
		  <td data-title="GPA">N/A</td>
		  <td data-title="Arbitrary Data">Edlund, Ben (July 1996).</td>
		</tr>
		<tr>
		  <td data-title="First Name">Jokey</td>
		  <td data-title="Last Name">Smurf</td>
		  <td data-title="Job Title">Giving Exploding Presents</td>
		  <td data-title="Favorite Color">Smurflow</td>
		  <td data-title="Wars or Trek?">Smurf</td>
		  <td data-title="Date of Birth">Smurfuary Smurfteenth, 1945</td>
		  <td data-title="Dream Vacation City">New Smurf City</td>
		  <td data-title="GPA">4.Smurf</td>
		  <td data-title="Arbitrary Data">One</td>
		</tr>
		<tr>
		  <td data-title="First Name">Cindy</td>
		  <td data-title="Last Name">Beyler</td>
		  <td data-title="Job Title">Sales Representative</td>
		  <td data-title="Favorite Color">Red</td>
		  <td data-title="Wars or Trek?">Wars</td>
		  <td data-title="Date of Birth">July 5, 1956</td>
		  <td data-title="Dream Vacation City">Paris</td>
		  <td data-title="GPA">3.4</td>
		  <td data-title="Arbitrary Data">3451</td>
		</tr>
		<tr>
		  <td data-title="First Name">Captain</td>
		  <td data-title="Last Name">Cool</td>
		  <td data-title="Job Title">Tree Crusher</td>
		  <td data-title="Favorite Color">Blue</td>
		  <td data-title="Wars or Trek?">Wars</td>
		  <td data-title="Date of Birth">December 13, 1982</td>
		  <td data-title="Dream Vacation City">Las Vegas</td>
		  <td data-title="GPA">1.9</td>
		  <td data-title="Arbitrary Data">Under the couch</td>
		</tr>
		</tbody>
	</table>

            
          
!
            
              table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  color: #222;
  margin: 0;
}

caption {
  font-variant: small-caps;
}

th,
td {
  line-height: 1.5em;
  vertical-align: top;
  padding: 12px 10px;
}

th *:first-child,
td *:first-child {
  margin-top: 0;
}
thead th {
  text-align: left;
  color: #000;
  border-bottom: 2px #000 solid;
}

tbody th, td {
  text-align: left;
  border-top: 1px solid #ccc;
}

tbody tr:hover th,
tbody tr:hover td {
  background: #f8f8f8;
}

tfoot {
  border-top: 4px solid #ccc;
}

	/* 
	Max width before this PARTICULAR table gets nasty
	This query will take effect for any screen smaller than 760px
	and also iPads specifically.
	*/
	@media 
	only screen and (max-width: 760px),
	(min-device-width: 768px) and (max-device-width: 1024px)  {
	
		/* Force table to not be like tables anymore */
		table, thead, tbody, th, td, tr { 
			display: block; 
		}
		
		/* Hide table headers (but not display: none;, for accessibility) */
		thead { 
			position: absolute;
			top: -9999px;
			left: -9999px;
		}
		
		tr { border: 1px solid #ccc; margin-bottom: 20px;}
		td { 
			/* Behave  like a "row" */
			border: none;
/*			border-bottom: 1px solid #eee; */
			position: relative;
		}
		
		td:before { 
  		/* Label the data */
      content: attr(data-title);
      display: inline-block;
			width: 35%; 
			padding-right: 10px; 
			white-space: nowrap;
		}
	}
	
	/* Smartphones (portrait and landscape) ----------- */
	@media only screen
	and (min-device-width : 320px)
	and (max-device-width : 480px) {
		body { 
			padding: 0; 
			margin: 0; 
			width: 320px; 
    }
    td {padding-left: 45%;}
    td:before {width: 40%;}
	}

	
	/* iPads (portrait and landscape) ----------- */
	@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
		body { 
			width: 495px; 
		}
	}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console