blob: 735b7bf3f41c5e5c37b489bc7a96211d20f760fa [file] [log] [blame]
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
The Original Code is Code.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<html lang="en-US">
<title>Vertical alignment and table height</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="copyright" href="/~dbaron/legal.html">
<style type="text/css">
/* XXX Should really remove black */
table td { border: thin solid black; } { height: auto; }
table.two { height: 30px; }
table.three { height: 500px; }
table.four, table.five { height: 50%; }
div.five { height: 600px; border: medium solid purple; } { height: auto; }
tr.small { height: 2px; }
tr.big { height: 200px; }
table.baseline td { vertical-align: baseline; }
table.middle td { vertical-align: middle; } td { vertical-align: top; }
table.bottom td { vertical-align: bottom; }
span.big { font-size: 400%; }
table.cellsmall td { height: 2px; }
table.cellauto td { height: auto; }
td.baselinea { vertical-align: baseline; }
td.baselineb { vertical-align: text-bottom; }
td.baselinec { vertical-align: text-top; }
td.baselined { vertical-align: super; }
td.baselinee { vertical-align: sub; }
td.baselinef { vertical-align: -12px; } /* probably correct */
td.baselineg { vertical-align: 40%; } /* probably correct */ { vertical-align: top; }
td.middle { vertical-align: middle; }
td.bottom { vertical-align: bottom; }
td.big { font-size: 300%; }
td.biggest { font-size: 600%; }
<h1>Vertical alignment and table height</h1>
<p>In each of the following tables the cells with 'Data' should all have the same baseline:</p>
<td class="baselineg biggest">Data</td>
<td class="top">Top</td>
<td class="middle">Middle</td>
<td class="baselinea">Data</td>
<td class="bottom">Bottom</td>
<td class="baselineb big">Data</td>
<td class="top">Top</td>
<td class="baselinec">Data</td>
<td class="baselinee big">Data</td>
<td class="middle">Middle</td>
<td class="bottom">Bottom</td>
<td class="baselined biggest">Data</td>
<td class="top">Top</td>
<td class="baselineg big">Data</td>
<td class="bottom">Bottom</td>
<td class="baselinef">Data</td>
<td class="baselinea biggest">Data</td>
<td class="middle">Middle</td>