Re: Alignments for Table behave strange in NN4

from my experience (believe me, i've fought this quite a bit in the last
two weeks), if you use CSS to align the text inside the table cells, the
entire table is shifted out of alignment (and sometimes the text after the
table too!)...  i've found that leaving alignment stuff out of any CSS
code that involves table cells (cells containing a <span>, <div>, <p>, etc
that have font-align properties seem to work fine), and instead use the
HTML attribute align...

ie:  instead of <td class="num"> (where "num" is right-aligned) use
<td class="num" align="right"> (where "num" has no particular alignment)

it's a pain in the butt, but it works from NS4.75 -> IE5.5 -> Mozilla
M17...

gLaNDix

--
Jesse Kaufman                           |       WebSurf Internet Access
Administration / Web Development        |       www.websurf.net
glandix@websurf.net                     |       Ph: 316.945.7873
www.linuxfreak.com/~glandix             |       Fax: 316.946.9944
--

<<< Vim is a REAL man's text editor.  I don't know why anyone else would
    even bother with sissy programs like emacs, or even worse...  pico!  >>>


On Wed, 27 Sep 2000, Lohengrin wrote:

> Although I understand that Netscape Navigator 4 is not fully compliant for
> HTML 4.01 and CSS2, I'm very disappointed for its inconsistent behaviours.
> Here's one example that has taken half of my day. There're 2 simple tables
> with the same codes except that one contains </TH>, </TD> while another
> doesn't. (I sometimes add them in order to remove the extra white space
> following the cell). However, they behave different. I don't know why or if
> there's any syntax problem in my codes.
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
>   "http://www.w3.org/TR/html4/strict.dtd">
> <HTML>
> <HEAD>
> <META http-equiv="Content-Style-Type"
>       content="text/css">
> <TITLE>Table Alignment</TITLE>
> <STYLE type="text/css">
> .num {
>     text-align: right;
>     font-family: "Courier New", Courier, monospace;
> }
> </STYLE>
> </HEAD>
> <BODY>
> <H1>Table Alignment</H1>
> <DIV style="text-align: center;">
>   <TABLE  width="400"
>          border="2">
>   <CAPTION>Table 1: Cells not closed with &lt;/TH&gt; and
> &lt;/TD&gt;</CAPTION>
>     <COL span="3">
>     <TBODY>
>     <TR>
>       <TH>Cell 11
>       <TD><P class="num">Cell 12</P>
>       <TD class="num">Cell 13
>     <TR>
>       <TH>Cell 21
>       <TD><P class="num">Cell 22</P>
>       <TD class="num">Cell 23
>     <TR>
>       <TH>Cell 31
>       <TD><P class="num">Cell 32</P>
>       <TD class="num">Cell 33
>   </TABLE>
> </DIV>
> <DIV  style="text-align: center;">
>   <TABLE width="400"
>          border="2">
>   <CAPTION>Table 2: Cells closed with &lt;/TH&gt; and &lt;/TD&gt;</CAPTION>
>     <COL span="3">
>     <TBODY>
>     <TR>
>       <TH>Cell 11</TH>
>       <TD><P class="num">Cell 12</P></TD>
>       <TD class="num">Cell 13</TD>
>     <TR>
>       <TH>Cell 21</TH>
>       <TD><P class="num">Cell 22</P></TD>
>       <TD class="num">Cell 23</TD>
>     <TR>
>       <TH>Cell 31</TH>
>       <TD><P class="num">Cell 32</P></TD>
>       <TD class="num">Cell 33</TD>
>   </TABLE>
> </DIV>
> </BODY>
> </HTML>
> --
> No spam
> No rumour
> No chain letter
> No advertisement
> No executable
> 

Received on Wednesday, 27 September 2000 13:10:32 UTC