浏览代码

Netscape 4.x tries to honor the <TD WIDTH="100"> tag on the middle column
and will squeeze the "EDIT | DEL" column on the right such that it gets
truncated if the text is too wide (e.g., Finnish). TD's WIDTH attribute is
deprecated in HTML 4.x, and it seems that Netscape 6.x and IE 6.0 mostly
ignore it, which is why the problem doesn't show up in those browsers.
With this change, the table formats properly for me in Netscape 4.08,
Mozilla 0.9.7+, and IE 6.0.

dahanc 23 年之前
父节点
当前提交
cc8a07412a
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      plugins/calendar/day.php

+ 5 - 5
plugins/calendar/day.php

@@ -27,9 +27,9 @@ function day_header() {
 
     echo "    <TR BGCOLOR=\"$color[0]\"><TD>" .
          "         <TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n" .
-         "         <TR><TH ALIGN=LEFT><A HREF=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">&lt;&nbsp;".
+         "         <TR><TH WIDTH=\"5%\" ALIGN=LEFT><A HREF=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">&lt;&nbsp;".
          date_intl('D',$prev_date)."</A></TH>\n" .
-         "         <TH>" .
+         "         <TH WIDTH=\"75%\">" .
          date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) . "</TH>\n" .
          "         <TH ALIGN=RIGHT><A HREF=\"day.php?year=$next_year&month=$next_month&day=$next_day\">".
          date_intl('D',$next_date)."&nbsp;&gt;</A></TH></TR>\n";
@@ -74,7 +74,7 @@ function display_events() {
         $eminute = substr($calfoo[key],2,2);
         if (!is_array($calfoo[value])){
             echo "         <TR BGCOLOR=\"$color[$eo]\"><TD>$ehour:$eminute</TD>\n" .
-                 "              <TD WIDTH=\"100%\">&nbsp;</TD>\n" .
+                 "              <TD>&nbsp;</TD>\n" .
                  "              <TD ALIGN=CENTER><FONT SIZE=-1><A HREF=\"event_create.php?year=$year&month=$month&day=$day&hour=".substr($calfoo[key],0,2)."\">".
                  _("ADD") . "</A></FONT></TD></TR>\n";
         } else {
@@ -85,7 +85,7 @@ function display_events() {
                 $elength='';
             }
             echo "         <TR BGCOLOR=\"$color[$eo]\"><TD>$ehour:$eminute$elength</TD>\n" .
-                 "              <TD WIDTH=\"100%\">[";
+                 "              <TD>[";
             echo ($calbar[priority]==1) ? "<FONT COLOR=\"$color[1]\">$calbar[title]</FONT>" : "$calbar[title]";
             echo"] $calbar[message]&nbsp;</TD>\n" .
                  "              <TD ALIGN=CENTER><FONT SIZE=-1><nobr>\n" .
@@ -132,4 +132,4 @@ initialize_events();
 display_events();
 ?>
 </table></td></tr></table>
-</body></html>
+</body></html>