twitter bootstrap - Need help in the CSS #unseen style -
i unseen th
in first tr
th
in second tr
disappeared. know how fix code first th
contains "min." text can showed when media width smaller 640px? thank in advance!
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=9; ie=8; ie=7; ie=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- latest compiled , minified css --> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <!-- jquery library --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <!-- latest compiled javascript --> <style type="text/css"> @media screen , (max-width: 800px) { #unseen table th div {display: none;}, } @media screen , (max-width: 640px) { #unseen table th:nth-child(1), #unseen table th:nth-child(6), #unseen table th:nth-child(7), #unseen table th:nth-child(8){display:none;}, </style> <body> <section id="unseen"> <table class="table-bordered table-striped table-condensed productform" width="100%" cellspacing="0px"> <thead> <tr style="border:solid 1px #ffffff;"> <th rowspan="2">photo</th> <th rowspan="2">part number<div>/ description</div> </th> <th rowspan="2">color <div>/ nm</div></th> <th colspan="3">luminous intensity</th> <th rowspan="2">viewing<br />angle</th> <th rowspan="2">data<br />sheet</th> <th rowspan="2" colspan="2">3d spec<sup>†</sup></th> <th rowspan="2">request<br />for quote</th> </tr> <tr> <th>min.</th> <th>typ.</th> <th>unit</th> </tr> </thead> </table> </section> </body> </html>
you can use :first-child
selector it. see fiddle http://jsfiddle.net/s281dopc/
#unseen table tr:first-child th:nth-child(1), #unseen table tr:first-child th:nth-child(6), #unseen table tr:first-child th:nth-child(7), #unseen table tr:first-child th:nth-child(8) { display:none; }
Comments
Post a Comment