Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Heres a better explination:</p> <p>View the code below in your browser.</p> <p>Notice that even though we've set the font-size of the second set of <code>&lt;span&gt;</code> tags the actual table cells are the same size.</p> <p>This is because the font size of the table cells <strong>IS</strong> still the same. We've only changed a child element of them, ie the <code>&lt;span&gt;</code></p> <p>setting <code>body{font-size:8px}</code> would work fine as the table will inherit this value. You can also use it directly on the table ie <code>table{font-size:8px}</code>, or you can use it on the cell as posted above.</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" lang="en"&gt; &lt;head&gt; &lt;style&gt; body{} td{} span {font-family: Verdana;} span.small{font-size:8px;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Default font size&lt;/h1&gt; &lt;table cellspacing="1" border="1" cellpadding="0"&gt; &lt;tbody&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;/tbody&gt; &lt;/table&gt; &lt;h2&gt;8px font size&lt;/h2&gt; &lt;table cellspacing="1" border="1" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="small"&gt;One&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="small"&gt;Two&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="small"&gt;Three&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="small"&gt;Four&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="small"&gt;Five&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="small"&gt;Six&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="small"&gt;Seven&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="small"&gt;Eight&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="small"&gt;Nine&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Hope this helps</p>
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      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