Hi,
I'm making a project, and I have decided to use a style I made a few months ago.
Now I'm sure it's 100% validated for XHTML 1.0 & 1.1, but the second I enter:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
at the top of the page, the "td" I use for copyrights stops being at the bottom of the page and sticks to the end of the content.
Meaning: The main table I'm using won't take 100% of the height the page can offer, or the "vertical-align: bottom" doesn't affect the cell anymore and there's something else for XHTML.
My code:
<html.....head..body..>
<table class="mainwindow" style="height: 100%;" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" style="height: 100%;" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align: top;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
** Content **
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="vertical-align: bottom;">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="subtitle">**Copy rights **</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
- <html.....head..body..>
- <table class="mainwindow" style="height: 100%;" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <table width="100%" style="height: 100%;" cellpadding="0" cellspacing="0">
- <tr>
- <td style="vertical-align: top;">
- <table width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- ** Content **
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: bottom;">
- <table width="100%" cellpadding="0" cellspacing="0">
- <tr>
- <td class="subtitle">**Copy rights **</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </body>
- </html>
body {
margin:0px 0 0 0;
padding:0 0 0 0;
font:76% Tahoma;
background:#eaeaea url(Style/bg.gif) top center repeat-y;
color:#3a3a3a;
text-align: center;
height: 100%;
}
table.mainwindow {
margin-left: auto;
margin-right: auto;
background-color: #76c2e7;
width: 781px;
background-repeat: no-repeat;
background-position: top right;
height: 100%;
}
td.subtitle {
background-color: #CFCFCF;
width: 100%;
height: 25px;
color: #555555;
font-size: 12px;
font-family: Arial;
text-align: center;
}
- body {
- margin:0px 0 0 0;
- padding:0 0 0 0;
- font:76% Tahoma;
- background:#eaeaea url(Style/bg.gif) top center repeat-y;
- color:#3a3a3a;
- text-align: center;
- height: 100%;
- }
- table.mainwindow {
- margin-left: auto;
- margin-right: auto;
- background-color: #76c2e7;
- width: 781px;
- background-repeat: no-repeat;
- background-position: top right;
- height: 100%;
- }
- td.subtitle {
- background-color: #CFCFCF;
- width: 100%;
- height: 25px;
- color: #555555;
- font-size: 12px;
- font-family: Arial;
- text-align: center;
- }
Sorry for all the tables - I need them.
Please help.
Thanks very much,
JFord