![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've encountered a problem with HTML files generated by Mathcad using the "save as HTML" option. Among other things, Mathcad allows for text, math, and graph objects. When I try to display the generated file in Firefox, the equations overlay the preceding text. The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" layer img src="./Test File_images/IMG0003_62826203.PNG" border="0"/ /layer /div It's the absolute address that seems to be the problem. I'd appreciate comments and suggestions for a way to fix the problem. For example, why not just substitute <p>...</p> blocks for the div sections? For reasons I don't understand, Firefox and IE8 render the page differently. IE has too much vertical space before the equation -- Firefox doesn't have enough. Comments? |
#3
| |||
| |||
|
|
Jack Crenshaw wrote: I've encountered a problem with HTML files generated by Mathcad using the "save as HTML" option. Among other things, Mathcad allows for text, math, and graph objects. When I try to display the generated file in Firefox, the equations overlay the preceding text. The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" layer img src="./Test File_images/IMG0003_62826203.PNG" border="0"/ /layer /div It's the absolute address that seems to be the problem. I'd appreciate comments and suggestions for a way to fix the problem. For example, why not just substitute <p>...</p> blocks for the div sections? For reasons I don't understand, Firefox and IE8 render the page differently. IE has too much vertical space before the equation -- Firefox doesn't have enough. Comments? One interesting aspect of the code you cite is the use of the <layer tag, a tag which is not HTML: it is a Netscape invention, not supported since Netscape 4. So the code is quite archaic. A second aspect is that the absolute block should be inside another block that is positioned, e.g. using position:relative. The code you cite does not indicate such an outer block exists. A third aspect is that IE gets a lot of positioning wrong, so that different behaviour is very possible with different versions of IE: and if the code emitter was written when Netscape 4 was a major browser, perhaps the other code (which you do not cite) was designed for archaic versions of IE, and may not work with more modern, more standards compliant versions. |
#4
| |||
| |||
|
|
I've encountered a problem with HTML files generated by Mathcad using the "save as HTML" option. Among other things, Mathcad allows for text, math, and graph objects. When I try to display the generated file in Firefox, the equations overlay the preceding text. The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" layer img src="./Test File_images/IMG0003_62826203.PNG" border="0"/ /layer /div It's the absolute address that seems to be the problem. I'd appreciate comments and suggestions for a way to fix the problem. For example, why not just substitute <p>...</p> blocks for the div sections? For reasons I don't understand, Firefox and IE8 render the page differently. IE has too much vertical space before the equation -- Firefox doesn't have enough. Comments? |
#5
| ||||
| ||||
|
|
Jack Crenshaw wrote: I've encountered a problem with HTML files generated by Mathcad using the "save as HTML" option. Among other things, Mathcad allows for text, math, and graph objects. When I try to display the generated file in Firefox, the equations overlay the preceding text. The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" layer img src="./Test File_images/IMG0003_62826203.PNG" border="0"/ /layer /div It's the absolute address that seems to be the problem. I'd appreciate comments and suggestions for a way to fix the problem. For example, why not just substitute <p>...</p> blocks for the div sections? For reasons I don't understand, Firefox and IE8 render the page differently. IE has too much vertical space before the equation -- Firefox doesn't have enough. Comments? One interesting aspect of the code you cite is the use of the <layer tag, a tag which is not HTML: it is a Netscape invention, not supported since Netscape 4. So the code is quite archaic. |
|
A second aspect is that the absolute block should be inside another block that is positioned, e.g. using position:relative. The code you cite does not indicate such an outer block exists. |
|
A third aspect is that IE gets a lot of positioning wrong, so that different behaviour is very possible with different versions of IE: and if the code emitter was written when Netscape 4 was a major browser, perhaps the other code (which you do not cite) was designed for archaic versions of IE, and may not work with more modern, more standards compliant versions. |
#6
| |||
| |||
|
|
On 6/27/2009 10:24 AM, C A Upsdell wrote: Jack Crenshaw wrote: I've encountered a problem with HTML files generated by Mathcad using the "save as HTML" option. Among other things, Mathcad allows for text, math, and graph objects. When I try to display the generated file in Firefox, the equations overlay the preceding text. The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" layer img src="./Test File_images/IMG0003_62826203.PNG" border="0"/ /layer /div It's the absolute address that seems to be the problem. I'd appreciate comments and suggestions for a way to fix the problem. For example, why not just substitute <p>...</p> blocks for the div sections? For reasons I don't understand, Firefox and IE8 render the page differently. IE has too much vertical space before the equation -- Firefox doesn't have enough. Comments? One interesting aspect of the code you cite is the use of the <layer tag, a tag which is not HTML: it is a Netscape invention, not supported since Netscape 4. So the code is quite archaic. A second aspect is that the absolute block should be inside another block that is positioned, e.g. using position:relative. The code you cite does not indicate such an outer block exists. A third aspect is that IE gets a lot of positioning wrong, so that different behaviour is very possible with different versions of IE: and if the code emitter was written when Netscape 4 was a major browser, perhaps the other code (which you do not cite) was designed for archaic versions of IE, and may not work with more modern, more standards compliant versions. Given Upsdell's comment on <layer>, I suggest you test the page at http://validator.w3.org/>. If Mathcad also creates style-sheets, that should be tested at <http://jigsaw.w3.org/css-validator/>. If you are getting excessive errors, you should consider a different HTML generator. |
|
Alternatively, continue to use Mathcad, but then manually correct the errors. |
|
The presence of any HTML errors can cause different browsers to render a page quite differently. Browsers are often coded to attempt to "guess" what a Web author really meant when an error is detected, but different browsers guess differently. |
#7
| |||
| |||
|
|
I've encountered a problem with HTML files generated by Mathcad using the "save as HTML" option. Among other things, Mathcad allows for text, math, and graph objects. When I try to display the generated file in Firefox, the equations overlay the preceding text. |
|
The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" ^^ ^^ |
#8
| |||
| |||
|
|
The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" ^^ ^^ Position 96 what? Bananas? Left what? |
|
If this snippet is any indication of the overall quality of the *whole* page you may be lucky that it displays at all. |
#9
| |||
| |||
|
|
Jack Crenshaw wrote: I've encountered a problem with HTML files generated by Mathcad using the "save as HTML" option. Among other things, Mathcad allows for text, math, and graph objects. When I try to display the generated file in Firefox, the equations overlay the preceding text. Also not mentioned is that "style" properties created by this Mathcad are invalid as well The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" ^^ ^^ Position 96 what? Bananas? Left what? |
|
If this snippet is any indication of the overall quality of the *whole* page you may be lucky that it displays at all. Consistency would be just luck. |
#10
| |||
| |||
|
|
Jonathan N. Little wrote: The problem seems to be the use of constructs like this: div style="position:absolute;top:96;left:20" ^^ ^^ Position 96 what? Bananas? Left what? The tricky part is that such CSS code "works" on some browsers in some circumstances. That is, it has the effect that the author meant, even though such behavior violates CSS specifications. More exactly, some browsers (e.g., IE 8 in "quirks" mode) interpret the numbers as numbers of pixels. More correct browsers (e.g., IE 7 in "standards" mode) ignore the declarations top:96 and left:20 as required by the specs. If this snippet is any indication of the overall quality of the *whole* page you may be lucky that it displays at all. Indeed. (I'd like to trim followups, as crossposting to three groups is seldom a good idea. However, as usual in crossposted threads, _none_ of the groups is the right one...) |
![]() |
| Thread Tools | |
| Display Modes | |
| |