![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
Jonathan N. Little 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. 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? Pixels. Which right off the bat seems like a Bad Idea, right? |
#12
| |||
| |||
|
|
Jukka K. Korpela wrote: (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...) Sigh. What would we do without etiquette police? |
#13
| ||||
| ||||
|
|
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. |
|
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. Well, it's not. The hierarchy is html/body/div/span/layer The absolute addresses are inside the <span> tag, as I showed. |
|
And the addresses really do seem to be absolute, not relative. As I progress through the file, the top address continues to increase monotonically. |
#14
| |||
| |||
|
|
Jack Crenshaw wrote: Jonathan N. Little 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. 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? Pixels. Which right off the bat seems like a Bad Idea, right? NOT pixels. This is a absolutely crucial point: with CSS, the units *must* be specified unless the value is zero, and if the units are omitted with a non-zero value, the CSS is invalid, and should (according to the standards) be ignored. The problem is that IE traditionally does NOT ignore such CSS: traditionally IE has assumed that the units are pixels if the units are not specified, but this is simply wrong, and has resulted in IE *apparently* displaying pages correctly when standards compliant browsers do not. |
#15
| |||
| |||
|
|
The *addresses* are however different from *positioning*, which Mr. Upsdell is trying to point you to. The div you've shown us is claiming to be absolutely positioned (you've declared position:absolute; inline), but as Brother Upsdell says, that'll only have an effect if the absolutely positioned block is inside a relatively positioned block. |
|
Based on your statements about hierarchy, that'd mean you want to declare body {position:relative;} in the CSS. |
#16
| |||
| |||
|
|
Sigh. What would we do without etiquette police? |
#17
| |||
| |||
|
|
I've encountered a problem with HTML files generated by Mathcad using the "save as HTML" option. 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 |
#18
| ||||||
| ||||||
|
|
F'up set to comp.infosystems.www.authoring.html On Sat, 27 Jun 2009 16:19:50 -0400, Jack Crenshaw wrote: 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. Do you mean that the img you've mentioned is the "equations," or "the preceding text?" |
|
And I wouldn't call that an absolute address. Hmm, but see my comment at the end about nomenclature. |
|
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. I don't fully understand it either, because you haven't provided a sample page. My bet is on the missing units, as mentioned by Jonathan, but it could be other things, or some combination thereof. |
|
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. Well, it's not. The hierarchy is html/body/div/span/layer The absolute addresses are inside the <span> tag, as I showed. Actually, you've shown that there *isn't* a span element. (I know you meant "element" even though you said "tag.") |
|
And the addresses really do seem to be absolute, not relative. As I progress through the file, the top address continues to increase monotonically. After spending some time studying your posts and replies, I now think there's a bit of a nomenclature problem. You keep talking about "absolute addresses" as opposed to "relative addresses." Such terms seem to me to have to do with URIs, like your "./Test File_images/IMG0003_62826203.PNG" in the pasted code snipplet above. (That'd be a relative address, AFAIAC, since it's relative to whatever domain the page is in.) |
|
The *addresses* are however different from *positioning*, which Mr. Upsdell is trying to point you to. The div you've shown us is claiming to be absolutely positioned (you've declared position:absolute; inline), but as Brother Upsdell says, that'll only have an effect if the absolutely positioned block is inside a relatively positioned block. Based on your statements about hierarchy, that'd mean you want to declare body {position:relative;} in the CSS. Does any of that help? |
#19
| |||||
| |||||
|
|
Jack Crenshaw wrote: Jonathan N. Little 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. 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? Pixels. Which right off the bat seems like a Bad Idea, right? NOT pixels. This is a absolutely crucial point: with CSS, the units *must* be specified unless the value is zero, and if the units are omitted with a non-zero value, the CSS is invalid, and should (according to the standards) be ignored. |
|
The problem is that IE traditionally does NOT ignore such CSS: traditionally IE has assumed that the units are pixels if the units are not specified, but this is simply wrong, and has resulted in IE *apparently* displaying pages correctly when standards compliant browsers do not. |
|
The bottom line here is that MathCAD is apparently emitting seriously defective code: code that will, in reality, appear to work only with old versions of IE, or with modern versions of IE when quirks mode is enabled. |
|
You have every right to go back to MathCAD and to give them hell for being so incompetent that it emits such terrible, defective code. |
| |
#20
| |||
| |||
|
|
Jack Crenshaw wrote: Jonathan N. Little 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. 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? Pixels. Which right off the bat seems like a Bad Idea, right? NOT pixels. This is a absolutely crucial point: with CSS, the units *must* be specified unless the value is zero, and if the units are omitted with a non-zero value, the CSS is invalid, and should (according to the standards) be ignored. |
![]() |
| Thread Tools | |
| Display Modes | |
| |