"grid"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html lang='en' class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/charuri/pen/PwgVbN?depth=everything&order=popularity&page=13&q=grid&show_forks=false" /> <style class="cp-pen-styles">.hide{ display: none; } /* Remove Scroll Bar */ html { overflow-y: hidden; } .container-fluid { background-color: #ff4444; padding:30px; } #container { padding: 50px; background-color: white; border-radius: 5px; } #container .buttons { text-align: right; padding-right: 60px; } #container .buttons button { border: 0; background-color: #dddddd; border-radius: 5px; } #container span.glyphicon { font-size: 2em; color: #FF4444; } #container ul, table{ list-style: none; margin-top: 50px; } #container .buttons { margin-bottom: 20px; } #container .table-hover img { height: 50px; } #container .grid li { float: left; width: 33%; height: 250px; text-align: center; vertical-align: middle; } table .img-circle { height: 30px; width: 30px; background-color: #ff4444; } ul .img-circle { width: 150px; height: 150px; background-color: #ff4444; text-align: center; display: block; margin-left: auto; margin-right: auto; margin-top: 20px; } h3{ display: block; }</style></head><body> <!-- Bootstrap core CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <div class="container-fluid"> <div id="container" class="col-md-8 col-md-offset-2"> <div class="buttons"> <button class="grid"><span class="glyphicon glyphicon-th" aria-hidden="true"></span></button> <button class="table-hover"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></button> </div> <table class="table table-hover" id="oi"> <thead> <tr> <th>#</th> <th></th> <th>First Name</th> <th>Last Name</th> <th>Gender</th> <th>Religion</th> <th>Status</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td><div class="img-circle"</div></td> <td>Robert</td> <td>Baratheon</td> <td>Male</td> <td>Faith of the Seven</td> <td>Deceased</td> </tr> <tr> <th scope="row">2</th> <td><div class="img-circle"</div></td> <td>Eddard</td> <td>Stark</td> <td>Male</td> <td>Old Gods of the Forest</td> <td>Deceased</td> </tr> </tbody </table> <ul class="grid hide"> <li><div class="img-circle"></div><h3>Item 1</h3></li> <li><div class="img-circle"></div><h3>Item 2</h3></li> <li><div class="img-circle"></div><h3>Item 3</h3></li> <li><div class="img-circle"></div><h3>Item 4</h3></li> <li><div class="img-circle"></div><h3>Item 5</h3></li> <li><div class="img-circle"></div><h3>Item 6</h3></li> </ul> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script> <script >$('button').on('click',function(e) { if ($(this).hasClass('grid')) { $('#container ul').removeClass('hide'); $('#container table').addClass('hide'); } else if($(this).hasClass('table-hover')) { $('#container table').removeClass('hide'); $('#container ul').addClass('hide'); } }); //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: