VML group element

Y

yangzi

The below code shows well in IE7:

<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style>v\: * { behavior: url(#default#VML);display:inline-block }</
style>
</head>
<body>
<?xml:namespace prefix = v />
<v:curve style="LEFT: 0px; position:absolute; TOP: 0px;WIDTH:454pt;
HEIGHT:500pt;" coordsize = "21600,21600" from = "55.5pt,65.25pt"
control1 = "76.375pt,46.875pt" control2 = "83.875pt,54.375pt" to =
"129pt,64.5pt" filled = "f" fillcolor = "black" strokecolor = "black"
strokeweight = ".75pt"><v:stroke></v:stroke></v:curve><?xml:namespace
prefix = v />
<v:rect style="LEFT: 83px; WIDTH: 82px; position:absolute; TOP: 85px;
HEIGHT: 15px" coordsize = "21600,21600" filled = "f" strokecolor =
"black" strokeweight = ".75pt"><v:fill></v:fill><v:stroke></v:stroke></
v:rect>
</body>
</html>

Once I group them together using VML group element as below:

<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style>v\: * { behavior: url(#default#VML);display:inline-block }</
style>
</head>
<body>
<?xml:namespace prefix = v />
<v:group id="GroupA" style="position:absolute;WIDTH:454pt; HEIGHT:
500pt;" >
<v:curve style="LEFT: 0px; position:absolute; TOP: 0px;WIDTH:454pt;
HEIGHT:500pt;" coordsize = "21600,21600" from = "55.5pt,65.25pt"
control1 = "76.375pt,46.875pt" control2 = "83.875pt,54.375pt" to =
"129pt,64.5pt" filled = "f" fillcolor = "black" strokecolor = "black"
strokeweight = ".75pt"><v:stroke></v:stroke></v:curve><?xml:namespace
prefix = v />
<v:rect style="LEFT: 83px; WIDTH: 82px; position:absolute; TOP: 85px;
HEIGHT: 15px" coordsize = "21600,21600" filled = "f" strokecolor =
"black" strokeweight = ".75pt"><v:fill></v:fill><v:stroke></v:stroke></
v:rect>
</v:group>
</body>
</html>

the curve disappeared and the rectangle became smaller. I can manage
to show the curve by putting very big number for group's coordsize but
the rectangle will not show.

Please help.
 
M

Murray

Are you only interested in how this works in IE? If you want to allow your
visitors to use other browsers, then you cannot use VML elements, which are
IE-only.
 
Y

yangzi

Are you only interested in how this works in IE?  If you want to allow your
visitors to use other browsers, then you cannot use VML elements, which are
IE-only.

Right now I am only interested in IE and maybe port to svg later. I
have found the problem in above code. It mixed units of pixel and
point. It works fine once converted all to pixel. Thanks for your
reply. Yangzi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top