Note that there are some explanatory texts on larger screens.

plurals
  1. POStrict DocType imposes minimum table row height in FF/Chrome
    primarykey
    data
    text
    <p>Something i'd never noticed before, but it seems that in Chrome/Firefox (and probably Opera/Safari, i've not checked those specifically) using a strict doctype prevents table rows from being displayed smaller than a value that i'm unable to determine the calculation of.</p> <p>The following document displays as one might imagine in IE7 with all table rows around 8px in height to match the height of the content (which is probably incorrect knowing IE), whilst in Chome/Firefox the rows are all 23px tall. No combination of border-collapse, padding, margin etc i've found will allow the rows to be smaller than this.</p> <pre><code> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;head&gt; &lt;style&gt; span { font-family: Verdana; font-size: 8px; line-height: 8px; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;table cellspacing="1" border="1"&gt; &lt;tr&gt; &lt;td&gt;&lt;span&gt;One&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span&gt;Two&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span&gt;Three&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span&gt;Four&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span&gt;Five&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span&gt;Six&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span&gt;Seven&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span&gt;Eight&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span&gt;Nine&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Setting the doctype to transitional causes the table rows to display around 8px in height as expected.</p> <p>Does anyone have any idea what's causing this apparent minimum row height?</p> <p>Cheers for any info.</p>
    singulars
    1. This table or related slice is empty.
    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