<html>
<head>
<title>Mobile First Responsive Faux Table</title
</head>
<body>
<h1>Mobile First Responsive Faux Table</h1>
<p>Trying a “mobile first” definition list based version
of <a href="http://css-tricks.com/examples/ResponsiveTables/responsive.php">
Responsive Tables from CSS Tricks</a>.</p>
<!--
semantically meaningless container div makes me a sad panda
!-->
<div class="faux-table">
<!--
hacky clone of 1st DL. i'd love to get rid of this entirely. but
i think i'd be more comfortable doing something like this in a
production environment using Modernizr and jQuery (or the
javascript solution of your choice). the reason we need this is
the DL contains both our header row (as DTs) and our first data
row (as DDs). if it's possible to get a single DL to behave as
2 table rows then it's beyond my current CSS-fu level
while we're discussing my mental deficiencies, anyone out there
know how hard it would be to add effects like sortable columns
to a solution like this?
!-->
<dl class="clone">
<dt>First Namzsdse</dt>
<dd>James</dd>
<dt>Last Name</dt>
<dd>Matman</dd>
<dt>Job Title</dt>
<dd>Chief Sandwich Eater</dd>
<dt>Favorite Color</dt>
<dd>Lettuce Green</dd>
<dt>Wars or Trek?</dt>
<dd>Trek</dd>
<dt>Porn Name</dt>
<dd>Digby Green</dd>
<dt>Date of Birth</dt>
<dd>January 13, 1979</dd>
<dt>Dream Vacation City</dt>
<dd>Gotham City</dd>
<dt>GPA</dt>
<dd>3.1</dd>
<dt>Arbitrary Data</dt>
<dd>RBX-12</dd>
</dl>
w
<!--
definition lists as table rows. it's turtles all the way down.
!-->
<dl>
<dt>First Name</dt>
<dd>James</dd>
<dt>Last Name</dt>
<dd>Matman</dd>
<dt>Job Title</dt>
<dd>Chief Sandwich Eater</dd>
<dt>Favorite Color</dt>
<dd>Lettuce Green</dd>
<dt>Wars or Trek?</dt>
<dd>Trek</dd>
<dt>Porn Name</dt>
<dd>Digby Green</dd>
<dt>Date of Birth</dt>
<dd>January 13, 1979</dd>
<dt>Dream Vacation City</dt>
<dd>Gotham City</dd>
<dt>GPA</dt>
<dd>3.1</dd>
<dt>Arbitrary Data</dt>
<dd>RBX-12</dd>
</dl>
<dl>
<dt>First Name</dt>
<dd>The</dd>
<dt>Last Name</dt>
<dd>Tick</dd>
<dt>Job Title</dt>
<dd>Crimefighter Sorta</dd>
<dt>Favorite Color</dt>
<dd>Blue</dd>
<dt>Wars or Trek?</dt>
<dd>Wars</dd>
<dt>Porn Name</dt>
<dd>John Smith</dd>
<dt>Date of Birth</dt>
<dd>July 19, 1968</dd>
<dt>Dream Vacation City</dt>
<dd>Athens</dd>
<dt>GPA</dt>
<dd>N/A</dd>
<dt>Arbitrary Data</dt>
<dd>Edlund, Ben (July 1996).</dd>
</dl>
<dl>
<dt>First Name</dt>
<dd>Jokey</dd>
<dt>Last Name</dt>
<dd>Smurf</dd>
<dt>Job Title</dt>
<dd>Giving Exploding Presents </dd>
<dt>Favorite Color</dt>
<dd>Smurflow</dd>
<dt>Wars or Trek?</dt>
<dd>Smurf</dd>
<dt>Porn Name</dt>
<dd>Smurflane Smurfmutt</dd>
<dt>Date of Birth</dt>
<dd>Smurfuary Smurfteenth, 1945 </dd>
<dt>Dream Vacation City</dt>
<dd>New Smurf City </dd>
<dt>GPA</dt>
<dd>4.Smurf </dd>
<dt>Arbitrary Data</dt>
<dd>One</dd>
</dl>
<dl>
<dt>First Name</dt>
<dd>Cindy</dd>
<dt>Last Name</dt>
<dd>Beyler </dd>
<dt>Job Title</dt>
<dd>Sales Representative </dd>
<dt>Favorite Color</dt>
<dd>Red </dd>
<dt>Wars or Trek?</dt>
<dd>Wars </dd>
<dt>Porn Name</dt>
<dd>Lori Quivey</dd>
<dt>Date of Birth</dt>
<dd>July 5, 1956 </dd>
<dt>Dream Vacation City</dt>
<dd>Paris </dd>
<dt>GPA</dt>
<dd>3.4 </dd>
<dt>Arbitrary Data</dt>
<dd>3451</dd>
</dl>
<dl>
<dt>First Name</dt>
<dd>Captain </dd>
<dt>Last Name</dt>
<dd>Cool </dd>
<dt>Job Title</dt>
<dd>Tree Crusher </dd>
<dt>Favorite Color</dt>
<dd>Blue</dd>
<dt>Wars or Trek?</dt>
<dd>Wars </dd>
<dt>Porn Name</dt>
<dd>Steve 42nd</dd>
<dt>Date of Birth</dt>
<dd>December 13, 1982 </dd>
<dt>Dream Vacation City</dt>
<dd>Las Vegas </dd>
<dt>GPA</dt>
<dd>1.9 </dd>
<dt>Arbitrary Data</dt>
<dd>Under the couch</dd>
</dl>
</div>
</body>
</html>
Output
This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account
Dismiss xKeyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |