|
|
|
Have you ever wondered how to get objects in the absolute center of the screen? It is simple, it is done with a table that takes up the entire screen with the alignments set to center.
Check out this example below, pretending that the border is the edge of a page:
To get a similar effect like this on a webpage, we could use the following code:
<table border="0" cellspacing="0" cellpadding="0" style="width:100%; height:100%">
<tr>
<td align="center" valign="middle"> </td>
</tr>
</table>
|
|
The code above creates a table that spans 100% high and 100% wide, with a cell is aligned horziontally and vertically centered. Notice that we used CSS to define the width and height as using the HTML Height attribute on tables is not valid HTML with the World Wide Web Consortium. It works in Internet Explorer, but it may not in others.
The code below is NOT valid HTML 4.0:
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<td align="center" valign="middle"> </td>
</tr>
</table>
|
|
So now you have read it all, let's just rub it in once more, continue to the summary.
|
|
|
|