M
McKirahan
[ I posted this a few days ago in alt.html.css but received
no response -- it only gets one or two postings a month.
If there's a more approriate ng then please let me know. ]
I have a Web page that uses some JavaScript and CSS.
I have specified a three column table with a fixed-width
left and right side; the center colum expands to fill the page.
Within this portion of the table I have another table that
specifies "display:none" to hide it. When the page loads,
if JavaScript is enabled then it will change to "display:block".
However, the problem under Firefox is that the width of
the inner table column is not 100% as is expected;
though, the width of the inner table is 100%....
It fails under FF 1.5 and Opera 9.10;
it works under IE 5.5 and 6.0.
Below is the source for a Web page that shows the problem.
The top table is good; the bottom table shows the problem
The only difference is: id="divi" style="display:none";
that is, the code up which the JavaScript acts on.
Can anyone identify the problem/issue? Thanks in advance.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ff_error.htm</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
window.onload = function() {
// If JS is enabled then make available items that use it.
if (document.getElementById("divi")) {
document.getElementById("divi").style.display = "block";
}
}
</script>
</head>
<body>
<table bgcolor="#EEEEEE" border="0" width="100%">
<tr valign="top">
<td bgcolor="#FFFF7D" width="175"> </td>
<th>
Hello World
<hr>
<table bgcolor="#FFFFFF" border="1" width="100%">
<tr>
<th bgcolor="#FF08A8" width="100%">Hello World</th>
</tr>
</table>
<hr>
Hello World
</th>
<td bgcolor="#FFFF7D" width="175"> </td>
</tr>
</table>
<br><br>
<table bgcolor="#EEEEEE" border="0" width="100%">
<tr valign="top">
<td bgcolor="#FFFF7D" width="175"> </td>
<th>
Hello World
<hr>
<table bgcolor="#FFFFFF" border="1" width="100%" id="divi"
style="display:none">
<tr>
<th bgcolor="#FF08A8" width="100%">Hello World</th>
</tr>
</table>
<hr>
Hello World
</th>
<td bgcolor="#FFFF7D" width="175"> </td>
</tr>
</table>
</body>
W3C says that "This Page Is Valid HTML 4.01 Transitional!".
no response -- it only gets one or two postings a month.
If there's a more approriate ng then please let me know. ]
I have a Web page that uses some JavaScript and CSS.
I have specified a three column table with a fixed-width
left and right side; the center colum expands to fill the page.
Within this portion of the table I have another table that
specifies "display:none" to hide it. When the page loads,
if JavaScript is enabled then it will change to "display:block".
However, the problem under Firefox is that the width of
the inner table column is not 100% as is expected;
though, the width of the inner table is 100%....
It fails under FF 1.5 and Opera 9.10;
it works under IE 5.5 and 6.0.
Below is the source for a Web page that shows the problem.
The top table is good; the bottom table shows the problem
The only difference is: id="divi" style="display:none";
that is, the code up which the JavaScript acts on.
Can anyone identify the problem/issue? Thanks in advance.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ff_error.htm</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
window.onload = function() {
// If JS is enabled then make available items that use it.
if (document.getElementById("divi")) {
document.getElementById("divi").style.display = "block";
}
}
</script>
</head>
<body>
<table bgcolor="#EEEEEE" border="0" width="100%">
<tr valign="top">
<td bgcolor="#FFFF7D" width="175"> </td>
<th>
Hello World
<hr>
<table bgcolor="#FFFFFF" border="1" width="100%">
<tr>
<th bgcolor="#FF08A8" width="100%">Hello World</th>
</tr>
</table>
<hr>
Hello World
</th>
<td bgcolor="#FFFF7D" width="175"> </td>
</tr>
</table>
<br><br>
<table bgcolor="#EEEEEE" border="0" width="100%">
<tr valign="top">
<td bgcolor="#FFFF7D" width="175"> </td>
<th>
Hello World
<hr>
<table bgcolor="#FFFFFF" border="1" width="100%" id="divi"
style="display:none">
<tr>
<th bgcolor="#FF08A8" width="100%">Hello World</th>
</tr>
</table>
<hr>
Hello World
</th>
<td bgcolor="#FFFF7D" width="175"> </td>
</tr>
</table>
</body>
W3C says that "This Page Is Valid HTML 4.01 Transitional!".