Connecting Tech Pros Worldwide Help | Site Map

XSL & CSS Cross Browser Compat Question.

  #1  
Old September 25th, 2008, 09:15 PM
SeanInSeattle
Guest
 
Posts: n/a
Hey all. I'm working on a fairly large XSL file along with an
external css file for my xml data. I'm running into cross browser
issues. The code below works in IE, but not in Firefox 3.0. Any
thoughts on why it doesn't work in Firefox 3.0?

Expand|Select|Wrap|Line Numbers
  1.  
  2. <link rel="stylesheet" href="reportStyle.css" type="text/css"/>
  3.  
  4.  
  #2  
Old September 25th, 2008, 09:15 PM
SeanInSeattle
Guest
 
Posts: n/a

re: XSL & CSS Cross Browser Compat Question.


By the way: The example code above is in the XSL.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <!-- // Primary Template // -->
  3. <xsl:template match="/">
  4. <html>
  5. <head>
  6. <title>Title</title>
  7. <!-- external css for IE -->
  8. <link rel="stylesheet" href="reportStyle.css" type="text/css"/>
  9. </head>
  10. <body>
  11. <div>
  12. <xsl:value-of select="/"/>
  13. </div>
  14. </body>
  15. </html>
  16. </xsl:template>
  17.  
  #3  
Old September 26th, 2008, 01:05 AM
Peter Flynn
Guest
 
Posts: n/a

re: XSL & CSS Cross Browser Compat Question.


SeanInSeattle wrote:
Quote:
By the way: The example code above is in the XSL.
<!-- external css for IE -->
<link rel="stylesheet" href="reportStyle.css" type="text/css"/>
To check that it is loading correctly in FF, install the WebDeveloper
toolbar and click on View CSS.

The fact that you have commented this line "external css for IE" makes
me wonder if perhaps it's the CSS itself which is causing the problem,
not the loading of the reportStyle.css file. Neither browser implements
all of CSS2, and the bits they do implement are sometimes done
differently. Writing cross-browser CSS is a black art :-)

(It would have been useful if both Microsoft and Mozilla had bothered to
read the fine documentation and learn something about document
engineering before starting to implement CSS in the first place, but
that was never going to happen, alas.)

///Peter
Closed Thread