Bug 3094 - obox is ugly on Mozilla in Standards mode
: obox is ugly on Mozilla in Standards mode
Status: RESOLVED FIXED
: Roxen WebServer
Other Modules
: 2.2
: All All
: P3 (normal) normal
: ---
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2002-05-17 20:50 CET by
Modified: 2002-05-22 11:52 CET (History)
Scrum Prio:
In scrum?: ---
Story included in sprints:
Unplanned in sprints:


Attachments


Description From 2002-05-17 20:50:43 CET
Apparently CSS2 requires that images be displayed as though they were part
of a text line.  This adds a bunch of space to images that are used solely
for spacing.  You only see this if your HTML document has a valid HTML
doctype (otherwise Mozilla goes into Quirks mode for Netscape 4 compatibility)

Example: http://dan.allantgroup.com/obox1.html
Example: http://dan.allantgroup.com/obox2.html
More info: http://developer.netscape.com/evangelism/docs/articles/img-table/

Fix:

Index: obox.pike
===================================================================
RCS file: /cvs/Roxen/2.2/server/modules/tags/obox.pike,v
retrieving revision 1.37
diff -u -p -r1.37 obox.pike
--- obox.pike   2001/09/21 15:58:16     1.37
+++ obox.pike   2002/05/17 18:44:09
@@ -33,7 +33,7 @@ static string img_placeholder (mapping a
 {
   int width=((int)args->outlinewidth)||1;

-  return sprintf("<img src=\"%s\" alt=\"\" width=\"%d\" height=\"%d\"%s>",
+  return sprintf("<img src=\"%s\" alt=\"\" style=\"display:block;\"
width=\"%d\" height=\"%d\"%s>",
                 unit_gif, width, width, (args->noxml?"":" /"));
 }
------- Comment #1 From 2002-05-18 15:46:29 CET -------
The patch works great for fixing rendering in Mozilla but unfortunately it seam
to break at least Netscape 4. Maybe we need a special attribute to control the
behaviour.

(I can't access your example pages.)
------- Comment #2 From 2002-05-18 19:26:23 CET -------
Example pages are there now (had them in the wrong directory).

Hm. It looks like Netscape 4 incorrectly processes <img style="display:block">,
but it doesn't mind a <style> tag plus a <span style="_obox"> wrapping the
obox.
 I don't know it it's possible to have the obox module insert the appropriate
<style> tag into the page header, though.
------- Comment #3 From 2002-05-21 17:56:33 CET -------
After some googling I found that a solution close to the original (and most
simple) idea might be to use stype="display:block; border:1;". This does for
some reason give me correct rendering in my NS4.
------- Comment #4 From 2002-05-21 18:55:05 CET -------
Weird :)

Ok, the following patch makes obox'es display correctly on NN4/6, and IE5/6.

Index: obox.pike
===================================================================
RCS file: /cvs/Roxen/2.2/server/modules/tags/obox.pike,v
retrieving revision 1.37
diff -u -r1.37 obox.pike
--- obox.pike   2001/09/21 15:58:16     1.37
+++ obox.pike   2002/05/21 16:49:00
@@ -33,7 +33,7 @@
 {
   int width=((int)args->outlinewidth)||1;

-  return sprintf("<img src=\"%s\" alt=\"\" width=\"%d\" height=\"%d\"%s>",
+  return sprintf("<img src=\"%s\" alt=\"\" width=\"%d\" height=\"%d\"
style=\"display:block;border:1;\"%s>",
                 unit_gif, width, width, (args->noxml?"":" /"));
 }

Note

You need to log in before you can comment on or make changes to this bug.