John Sudds - MSFT
Your question is a valid one, and maybe you¡¯ve already figured it out by now.
In your example, the RECT element is absolutely positioned, but the line is not. The line is painted starting at point (300,300) away from the bounding box of the containing div, in this case the BODY tag. The line is offset due to the default margins of the body, which the following CSS rule would remove:
body { margin:0 }
However, since you are painting a line to coincide with an absolutely positioned RECT, the LINE should also be absolutely positioned.
<v:rect style="POSITION:absolute; LEFT:300px; TOP:300px; WIDTH:100px; HEIGHT:100px" />
<v:line style="POSITION:absolute; LEFT:300px; TOP:300px;" from="0,0" to="100,100" />
For more complex drawings, it is easier to set all VML elements to position:absolute and place the elements inside a DIV that is located at the correct location on the page.
Code Snippet
<html xmlns:v="urn:schemas-microsoft-com:vml">
<style type="text/css">
v\:* {
behavior:url(#default#VML);
position:absolute;
}
</style>
<div style="position:absolute; left:300px; top:300px;">
<v:rect style="width:100;height:100" />
<v:line from="0,0" to="100,100" />
</div>
Hope that helps.