DHTML Lab - dhtmlab.com - Dynamic Headline Fader, Version 2.01 | 10 | WebReference

DHTML Lab - dhtmlab.com - Dynamic Headline Fader, Version 2.01 | 10

Logo

Dynamic Headline Fader, Version 2.01
accounting for text justification in IE4mac


The Problem

When we specify "center" or "right" for FDRtxtAln, the last line in the fader display is not correctly aligned. For example, if we specify a "center" value for FDRtxtAln:


IE4+win rendering

IE4mac rendering

IE4mac will not properly justify a line unless the line has a soft or hard wrap assigned to it.

The Solution

We will always add a hard line break at the end of all fader item text displays.

Therefore, in FDRfade(), where we define the item text (newsStr), we add an IE4mac-specific statement:

function FDRfade(){
   .
   .
   .
   if (isLink) {
      newsStr = "<A CLASS=newslink "
              + "HREF='" + prefix + linkStr + "'>"
              + arNews[newsCount] + "</A>"
   }
   else {
      newsStr = (NS4) ? ("<P CLASS=nolink>"+dispStr+"</P>") : dispStr;
   }

   if(IE4mac) newsStr += "<BR>"
   .
   .
   .
}

We're done with IE4mac fixes, but we do have one NS4mac fix to include.


Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Sep 21, 1999
Revised: Sep 21, 1999

URL: https://www.webreference.com/dhtml/column25/addendum1/fdr201iemac3.html