Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS Apply white space left and right of the table content
    primarykey
    data
    text
    <p>i want to design a table that looks like the table in the image.</p> <p><a href="http://tinypic.com/r/33y1477/5" rel="nofollow">Table example</a></p> <p>I could aply the space using empy tags and then using css so they became white but code like that is ugly.</p> <p>This is what i have in the moment:</p> <pre><code>&lt;table id="specs"&gt; &lt;tr&gt; &lt;th class="thead" &gt;A&lt;/th&gt; &lt;th class="thead"&gt;B&lt;/th&gt; &lt;th class="thead"&gt;C&lt;/th&gt; &lt;th class="thead"&gt;D&lt;/th&gt; &lt;th class="thead"&gt;E&lt;/th&gt; &lt;/tr&gt; &lt;tr class="alt"&gt; &lt;td class="type2"&gt;1&lt;/td&gt; &lt;td class="type"&gt;2&lt;/td&gt; &lt;td class="type"&gt;3&lt;/td&gt; &lt;td class="type"&gt; 4&lt;/td&gt; &lt;td class="type"&gt;5%&lt;/td&gt; &lt;td class="type" style="border-top:10px solid white;"&gt;6&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="type2"&gt;7&lt;/td&gt; &lt;td class="type"&gt;8&lt;/td&gt; &lt;td class="type"&gt;9&lt;/td&gt; &lt;td class="type"&gt;10&lt;/td&gt; &lt;td class="type"&gt;11&lt;/td&gt; &lt;td class="type"&gt;12&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>CSS:</p> <pre><code>#specs { color: #0099FF; font-size: 13px; border-collapse: collapse; } #specs th { background-color: #0099FF; color: white; padding-left: 50px; padding-right: 10px; border-bottom: 10px solid white; } #specs tr.alt td { background-color: #C0D9D9; } #specs th.thead { padding-right: 30px; text-align: center; } #specs tr td.type2 { border-left: 10px solid white; text-align: left; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload