Kompx.com or Compmiscellanea.com

HTML centering

Windows : Internet Explorer 3.0+, Firefox 1.0+, Google Chrome, Opera 3.51 - 6.xx and 9.0+, Safari 3.1+, SeaMonkey 1.0+ [ 1 ].

Linux : Firefox 1.0+, Chromium, Opera 5.0 - 6.xx and 9.0+, SeaMonkey 1.0+ [ 2 ].

Centering the whole content of a web page in the viewable area of a browser by pure HTML - no CSS. A box to keep the content of the page is HTML centered horizontally and vertically - [ Open demo page ]

HTML. Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>HTML centering</title>

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">

</head>

<body bgcolor="#ffffff">

<table width="100%" height="100%" bgcolor="#a3ddc4">

<tr>

<td align="center">

<table width="800" height="500" bgcolor="#ff6f6f">

<tr>

<td>&nbsp;</td>

</tr>

</table>

</td>

</tr>

</table>

</body>

</html>

The outer HTML table makes the whole web browser viewable area, except margins, a HTML table and the whole area of this HTML table - a HTML table cell.

The cell of the outer HTML table inherits the default value for valign attribute from its parent table row. And this row in its turn inherits the default value for valign attribute from the outer HTML table tbody - even if tbody tag is not used. And that value is middle. So a block of content inside the cell of the outer HTML table is centered vertically in web browser viewable are.

Align="center" of the outer HTML table cell makes a block of content inside it centered horizontally in web browser viewable are.

The inner table, the one inside of the outer HTML table cell makes up a box of a given size. Or there may be no set height or no set width or both. Then the size of the box is to adjust to accommodate the content, whatever its dimensions are. If the width or height or both of the box results to be larger than web browser viewable area, then it still ends up to be centered.

Since HTML centering is the oldest method to center content horizontally and vertically, it works well not just in older web browsers, but in ones that can be described as downright ancient. Like adding one more HTML tag ( <center></center> ) around the outer table makes it funcion as deep as Internet Explorer 3 : [ Open demo page ]

Download Internet Explorer 3: a pack, containing 3.0, 4.01, 5.01, 5.5, 6.0 versions of Internet Explorer

HTML. Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>HTML centering for Internet Explorer 3</title>

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">

</head>

<body bgcolor="#ffffff">

<!-- For Internet Explorer 3 --><center><!-- For Internet Explorer 3 -->

<table width="100%" height="100%" bgcolor="#a3ddc4">

<tr>

<td align="center">

<table width="800" height="500" bgcolor="#ff6f6f">

<tr>

<td>&nbsp;</td>

</tr>

</table>

</td>

</tr>

</table>

<!-- For Internet Explorer 3 --><center><!-- For Internet Explorer 3 -->

</body>

</html>

HTML horizontal and vertical centering of a box containing web page content has become obsolescent as a result of semantic markup spread. But it is still reliable. Not only in the major and modern web browsers, but in many alternative and older ones as well.

There is a minor flaw in it though. The height attribute of the <table><table/> tag is used there. It is supported for years by the majority of web browsers, but is incompatible with the standards promoted by World Wide Web Consortium (W3C). So the code does not pass W3C validation. Back in 1990s - early 2000s, it was complicated or impossible to succeed in making a code both valid and working in the majority of web browsers, so the flaw was not looked at as a real problem.


[ 1 ]

As well as Netscape 2.02 - 4.80 and Offbyone. There is some shift of page content to the top left corner of the web browser viewable area in Netscape 2.02 - 4.80, since these web browsers reserve the place for scrollbars.

[ 2 ]

As well as Netscape 2.02 - 4.80. There is some shift of page content to the top left corner of the web browser viewable area in Netscape 2.02 - 4.80, since these web browsers reserve the place for scrollbars.


Aliosque subditos et thema


HTML table borders without CSS


Example n.1:   HTML table borders without CSS   cellspacing="2"   bgcolor="#ff6600" HTML / XHTML. Code: <table width="100%" cellspacing="2" cellpadding="0" border="0" align="center" bgcolor="#ff6600"> <tr bgcolor="#ffffff"> <td width="33%" height="67">&nbsp;</td> <td width="34%">HTML table borders without CSS</td> <td width="33%">&nbsp;</td> </tr> <tr bgcolor="#ffffff"> <td height="67">cellspacing="2"</td> <td>&nbsp;</td> <td>bgcolor="#ff6600"</td> </tr> </table> Example n.2:   HTML table borders without CSS   cellspacing="8"   bgcolor="#999999" HTML / XHTML. Code: <table width="100%" cellspacing="8" cellpadding="0" border="0" align="center" bgcolor="#999999"> <tr bgcolor="#ffffff"> <td width="33%" height="67">&nbsp;</td> <td width="34%">HTML table borders without CSS</td> <td width="33%">&nbsp;</td> </tr> <tr bgcolor="#ffffff"> <td height="67">cellspacing="8"</td> <td>&nbsp;</td> <td>bgcolor="#999999"</td> </tr> </table> Example n.3 - for Netscape 3.04-6.0, Mozilla 0.6-0.92 and Arachne.

Network setup in DOS. Microsoft Network Client 3.0


In order to install Microsoft Network Client 3.0 and set up network in DOS, there have to be several programs at hand: 1. Microsoft Network Client 3.0 [ Download ] 2. NDIS 2.0 driver for Ethernet network card. For example: Realtek RTL8029AS [ Download ]. Drivers for other network cards may be found, for instance, on web sites of Ethernet cards manufacturers. 3. If it is not MS-DOS 6.0+ to be used, QEMM97 [ Download ] Installing Microsoft Network Client 3.0 and setting up network in DOS, step by step: 1. Create a folder, for example C:\DRIVERS\. Put there: a NDIS 2.0 driver for Ethernet network card. 2. Prepare installation floppies of Microsoft Network Client 3.0: DSK3-1.EXE -d A: DSK3-2.EXE -d A: 3. Start setup.exe from the first floppy and begin Microsoft Network Client 3.0 installation. Installation is starting. Press Enter to continue Select folder for Microsoft Network Client 3.0 to be installed to. It may be any or the suggestion of the installer may be left as it is - in the case discussed it is left as it is. Enter Microsoft Network Client 3.0 installer examining the system files Select driver for Ethernet network card. If there is no right driver on the list, choose "*Network adapter not shown on list below ..." Enter This dialogue appears if there was no right driver on the proposed list of Ethernet network card drivers and "*Network adapter not shown on list below ..." has been selected. Specify the path to the folder containing the appropriate driver for the Ethernet network card. In the case discussed it is C:\DRIVERS\, typing it in. Enter Select driver from C:\DRIVERS\ folder specified in the previous step. In the case discussed it is RTL8029AS PCI Ethernet Adapter. Enter Choose to let or not to let Microsoft Network Client 3.0 use more RAM in its work to get the best performance. Any of the two choices is acceptable. For example - let it to. Enter Enter user name of up to 20 characters. It can contain Latin letters, numbers and characters listed. In the case discussed it is "net".