[Netscape 4.7] Table problemen

Pagina: 1
Acties:

  • SchizoDuckie
  • Registratie: April 2001
  • Laatst online: 18-02-2025
Ik ben m'n website weer wat meer browser compatible aan het maken, en tegelijkertijd aan het voorzien van wat handige (php) functies die de opmaak wat automatiseren.

Ik post de php code er maar even bij, dit is misschien handiger voor anderen, en makkelijker dan de source van een pagina doorspitten.

van deze pagina wordt het rechter vlak gevuld door de volgende code:

code een beetje geordend voor duidelijkheid
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?
$table = array();
$table[0] =                        //row 0
array(
       writetable("hoi", true, array('dit is een test')), //col 1
       writetable("hoi", true, array('dit is nog een test')), //col 2
       array('70,50,center,top', '30,50,right,bottom') //breedte%, hoogte%, align, valign voor de beide cellen
      );
$table[1] =                       //row 1
array(
       writetable("2e column", true, array('test geblaat tekst')), // col 1
       writetable("hoi", true, array('dit is nog een test')),  // col 2
       array('60,70,left,middle', '40,70,center,bottom') //breedte%, hoogte%, align, valign voor de beide cellen
     );
$maintext = writetablecontainer($table);
?>

de functie writetablecontainer
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?
function writetablecontainer($array)
{
    
    $table = "
<table border='0' cellspacing='4' width='608' height='412' background='images/spacer.gif'>";
    $i = 0;
    $size = sizeof($array);
    $size = $size -1;
    while ($i < $size)
    {
        $table .= "
 <tr>";
        $j = 0;        
        $tmparray = $array[$i];
        $size = sizeof($tmparray) -1;
        $infoarray = $tmparray[$size];
        $numcols= (sizeof($tmparray) -1);
        while ($j < $numcols)
        {
            $celinfo = explode(',', $infoarray[$j]);
        $table .= "
   <td background='images/spacer.gif' width='".floor("0.".$celinfo[0] * 608)."' height='".floor("0.".$celinfo[1] * 412)."' align='".$celinfo[2]."' valign='".$celinfo[3]."' >".$tmparray[$j]."</td>
            ";
            $j++;
        }
        $table .= "
 </tr>";
        $i++;
    }
    $table .= "
</table>";
return ($table);
}
?>

dit is de 'grote' opmaak tabel


de functie writetable doet het volgende:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?
function writetable($title, $autotd, $data_array, $width="", $pic="images/dialoghead.jpg")
{ // nette netscape code begint vanaf eerste <tr>
$result = '
<table border="0" cellspacing="0" cellpadding="0" bgcolor="" background="" class="margin" width="'.$width.'" height="">
  <tr>
    <td colspan="3" bgcolor="#000000">[img]"images/spacer.gif"[/img]</td>
  </tr>
  <tr>
    <td bgcolor="#000000">[img]"images/spacer.gif"[/img]</td>
    <td bgcolor="white" class="dialog" background="'.$pic.'" style="background-repeat:repeat-x;" height="20"><center><b>&amp;nbsp;'.$title.'&amp;nbsp;</b></center></td>
    <td bgcolor="#000000">[img]"images/spacer.gif"[/img]</td>
  </tr>'; // tot hier voor nette netscape code!!!
  $i = 0;
  while ($i < sizeof($data_array))
    {
      $result .= '
  <tr>
    <td colspan="3" bgcolor="#000000">[img]"images/spacer.gif"[/img]</td>
  </tr>
  <tr>
    <td bgcolor="#000000">[img]"images/spacer.gif"[/img]</td>   
    <td bgcolor="white" class="maintable" style=" FILTER: Alpha(Opacity=75);">
          <table border="0" cellspacing="5" width="100%" height="100%">
           <tr>
            <td class="margin">'.$data_array[$i].'</td>
           </tr>
          </table></td>
    <td bgcolor="#000000">[img]"images/spacer.gif"[/img]</td>
  </tr>
  ';
    $i++;
    }
   $result .='<tr>
    <td colspan="3" bgcolor="#000000">[img]"images/spacer.gif"[/img]</td>
  </tr></table> ';
  return($result);
}
?>

dit is dus zo'n kleine tabel

Dit is allemaal redelijk tot goed browser compatible (NS 4.7 is het belangrijkst), maar op 2 punten wil het nog niet:

• De tabellen die uit Writetable() komen zijn te hoog in netscape, terwijl m'n html (volgens mij :+ ) goed is
• De achtergrond van de door Writetablecontainer() gegenereerde tabel is niet transparant ;(

Ik heb in de search gevonden dat het kan helpen om een transparante image als background te zetten, maar ook dat mag niet baten :(

Zijn er NS Experts hier die weten wat ik fout doe :?

Stop uploading passwords to Github!


  • Hangloozz
  • Registratie: Juli 1999
  • Laatst online: 13-07 17:24

Hangloozz

{ @$%&# }

ehm, ik heb liever de output in de browser.
kun je die ff posten, aangezien het daar mis gaat en met aan zekerheid grenzende waarschijnlijkheid niet in je php...

edit:
ohw, shoot, je hebt een linkje; ik heb nix gezegd :X

www.jurgroessen.nl


  • Hangloozz
  • Registratie: Juli 1999
  • Laatst online: 13-07 17:24

Hangloozz

{ @$%&# }

mja, da's lekker, ik krijg deze output van Homesite als ik um door de validator trek..
ik zou bijna zeggen :html-op-het-net :)
tsjek it out:
Line Message
17 The tag name: "!-" not found in currently active versions
24 The tag:"HEAD" is not allowed within: "!-" It is only allowed within: HTML.
52 The tag:"BODY" is not allowed within: "!-" It is only allowed within: HTML.
52 The tag: "BODY" doesn't have an attribute: "LEFTMARGIN" in currently active versions.
52 The tag: "BODY" doesn't have an attribute: "TOPMARGIN" in currently active versions.
52 The tag: "BODY" doesn't have an attribute: "MARGINWIDTH" in currently active versions.
52 The tag: "BODY" doesn't have an attribute: "MARGINHEIGHT" in currently active versions.
53 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
62 The tag:"TD" is not allowed within: "P" It is only allowed within: TR.
63 "" is not valid value for the "BGCOLOR" attribute in HTML4. Valid values for this attribute are: 16 color names, Dynamic expression, sRGB.
63 "" is not valid value for the "BGCOLOR" attribute in any of the currently active versions. See the above warnings for more details.
63 The tag: "TABLE" doesn't have an attribute: "BACKGROUND" in currently active versions.
63 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
69 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
70 '0' is not valid value for the "BORDER" attribute in HTML32. Valid values for this attribute are: Dynamic expression, no value, positive non zero integer, zero.
70 '0' is not valid value for the "BORDER" attribute in any of the currently active versions. See the above warnings for more details.
70 '4' is not valid value for the "CELLSPACING" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer, zero.
70 '4' is not valid value for the "CELLSPACING" attribute in HTML4. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
70 '4' is not valid value for the "CELLSPACING" attribute in any of the currently active versions. See the above warnings for more details.
70 '608' is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
70 '608' is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
70 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
70 The tag: "TABLE" doesn't have an attribute: "BACKGROUND" in currently active versions.
72 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
72 '0' is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer.
72 '0' is not valid value for the "WIDTH" attribute in HTML4. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
72 '0' is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
72 '0' is not valid value for the "HEIGHT" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer.
72 '0' is not valid value for the "HEIGHT" attribute in any of the currently active versions. See the above warnings for more details.
72 'center' is not valid value for the "ALIGN" attribute in HTML32. Valid values for this attribute are: Dynamic expression, center, left, right.
72 'center' is not valid value for the "ALIGN" attribute in HTML4. Valid values for this attribute are: Dynamic expression, center, char, justify, left, right.
72 'center' is not valid value for the "ALIGN" attribute in any of the currently active versions. See the above warnings for more details.
72 'top' is not valid value for the "VALIGN" attribute in HTML32. Valid values for this attribute are: Dynamic expression, baseline, bottom, middle, top.
72 'top' is not valid value for the "VALIGN" attribute in HTML4. Valid values for this attribute are: Dynamic expression, baseline, bottom, middle, top.
72 'top' is not valid value for the "VALIGN" attribute in any of the currently active versions. See the above warnings for more details.
73 "" is not valid value for the "BGCOLOR" attribute in HTML4. Valid values for this attribute are: 16 color names, Dynamic expression, sRGB.
73 "" is not valid value for the "BGCOLOR" attribute in any of the currently active versions. See the above warnings for more details.
73 The tag: "TABLE" doesn't have an attribute: "BACKGROUND" in currently active versions.
73 "" is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
73 "" is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
73 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
79 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
79 In HTML 4.0, CENTER is deprecated.
88 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
100 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
100 '0' is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer.
100 '0' is not valid value for the "WIDTH" attribute in HTML4. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
100 '0' is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
100 '0' is not valid value for the "HEIGHT" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer.
100 '0' is not valid value for the "HEIGHT" attribute in any of the currently active versions. See the above warnings for more details.
100 'right' is not valid value for the "ALIGN" attribute in HTML32. Valid values for this attribute are: Dynamic expression, center, left, right.
100 'right' is not valid value for the "ALIGN" attribute in HTML4. Valid values for this attribute are: Dynamic expression, center, char, justify, left, right.
100 'right' is not valid value for the "ALIGN" attribute in any of the currently active versions. See the above warnings for more details.
100 'bottom' is not valid value for the "VALIGN" attribute in HTML32. Valid values for this attribute are: Dynamic expression, baseline, bottom, middle, top.
100 'bottom' is not valid value for the "VALIGN" attribute in HTML4. Valid values for this attribute are: Dynamic expression, baseline, bottom, middle, top.
100 'bottom' is not valid value for the "VALIGN" attribute in any of the currently active versions. See the above warnings for more details.
101 "" is not valid value for the "BGCOLOR" attribute in HTML4. Valid values for this attribute are: 16 color names, Dynamic expression, sRGB.
101 "" is not valid value for the "BGCOLOR" attribute in any of the currently active versions. See the above warnings for more details.
101 The tag: "TABLE" doesn't have an attribute: "BACKGROUND" in currently active versions.
101 "" is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
101 "" is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
101 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
107 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
107 In HTML 4.0, CENTER is deprecated.
116 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
130 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
130 '0' is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer.
130 '0' is not valid value for the "WIDTH" attribute in HTML4. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
130 '0' is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
130 '0' is not valid value for the "HEIGHT" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer.
130 '0' is not valid value for the "HEIGHT" attribute in any of the currently active versions. See the above warnings for more details.
130 'left' is not valid value for the "ALIGN" attribute in HTML32. Valid values for this attribute are: Dynamic expression, center, left, right.
130 'left' is not valid value for the "ALIGN" attribute in HTML4. Valid values for this attribute are: Dynamic expression, center, char, justify, left, right.
130 'left' is not valid value for the "ALIGN" attribute in any of the currently active versions. See the above warnings for more details.
130 'middle' is not valid value for the "VALIGN" attribute in HTML32. Valid values for this attribute are: Dynamic expression, baseline, bottom, middle, top.
130 'middle' is not valid value for the "VALIGN" attribute in HTML4. Valid values for this attribute are: Dynamic expression, baseline, bottom, middle, top.
130 'middle' is not valid value for the "VALIGN" attribute in any of the currently active versions. See the above warnings for more details.
131 "" is not valid value for the "BGCOLOR" attribute in HTML4. Valid values for this attribute are: 16 color names, Dynamic expression, sRGB.
131 "" is not valid value for the "BGCOLOR" attribute in any of the currently active versions. See the above warnings for more details.
131 The tag: "TABLE" doesn't have an attribute: "BACKGROUND" in currently active versions.
131 "" is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
131 "" is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
131 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
137 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
137 In HTML 4.0, CENTER is deprecated.
146 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
158 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
158 '0' is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer.
158 '0' is not valid value for the "WIDTH" attribute in HTML4. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
158 '0' is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
158 '0' is not valid value for the "HEIGHT" attribute in HTML32. Valid values for this attribute are: Dynamic expression, positive non zero integer.
158 '0' is not valid value for the "HEIGHT" attribute in any of the currently active versions. See the above warnings for more details.
158 'center' is not valid value for the "ALIGN" attribute in HTML32. Valid values for this attribute are: Dynamic expression, center, left, right.
158 'center' is not valid value for the "ALIGN" attribute in HTML4. Valid values for this attribute are: Dynamic expression, center, char, justify, left, right.
158 'center' is not valid value for the "ALIGN" attribute in any of the currently active versions. See the above warnings for more details.
158 'bottom' is not valid value for the "VALIGN" attribute in HTML32. Valid values for this attribute are: Dynamic expression, baseline, bottom, middle, top.
158 'bottom' is not valid value for the "VALIGN" attribute in HTML4. Valid values for this attribute are: Dynamic expression, baseline, bottom, middle, top.
158 'bottom' is not valid value for the "VALIGN" attribute in any of the currently active versions. See the above warnings for more details.
159 "" is not valid value for the "BGCOLOR" attribute in HTML4. Valid values for this attribute are: 16 color names, Dynamic expression, sRGB.
159 "" is not valid value for the "BGCOLOR" attribute in any of the currently active versions. See the above warnings for more details.
159 The tag: "TABLE" doesn't have an attribute: "BACKGROUND" in currently active versions.
159 "" is not valid value for the "WIDTH" attribute in HTML32. Valid values for this attribute are: Dynamic expression, percent, positive non zero integer, zero.
159 "" is not valid value for the "WIDTH" attribute in any of the currently active versions. See the above warnings for more details.
159 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.
165 The tag: "TD" doesn't have an attribute: "BACKGROUND" in currently active versions.
165 In HTML 4.0, CENTER is deprecated.
174 The tag: "TABLE" doesn't have an attribute: "HEIGHT" in currently active versions.

www.jurgroessen.nl


  • SchizoDuckie
  • Registratie: April 2001
  • Laatst online: 18-02-2025
Ik heb even de menuitems die automagisch in een javascript array gezet worden weggehaald. (daar nekt je homesite op namelijk)

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.nvlf.nl%2Ftable.nvlf&charset=%28detect+automatically%29&doctype=Inline

Nu jij weer :P de dingen waar de validator over valt zijn voor netschaap compatibility :)

Stop uploading passwords to Github!


  • SchizoDuckie
  • Registratie: April 2001
  • Laatst online: 18-02-2025
*swing*

Iemand die dit weet?

Stop uploading passwords to Github!


  • Hangloozz
  • Registratie: Juli 1999
  • Laatst online: 13-07 17:24

Hangloozz

{ @$%&# }

Op vrijdag 01 februari 2002 01:22 schreef papa_eend het volgende:
Ik heb even de menuitems die automagisch in een javascript array gezet worden weggehaald. (daar nekt je homesite op namelijk)


Nu jij weer :P de dingen waar de validator over valt zijn voor netschaap compatibility :)
dacht ut niet mannetje :P
als jij een comment-container start op deze wijze: <!-- en je gaat daarna verder met een hele rits---- om een moii kader te krijgen voor je credits, dan ga je al op de foute tour;
een commentcontainer mag nooit meer dan 1 (lees: één) - bevatten.
Elke 2 -- sluiten de comment weer af namelijk.
Daardoor krijg je al een waterval van fouten.
Pleur eerst eens die hele commentzooi d'ruit.

Daarnaast kom ik niet afgesloten P's tegen..
Lege bgcolor value in TD's..

nee, je moet er nog wel wat aan bijschuren ;)

www.jurgroessen.nl

Pagina: 1