Re: SVG in a HTML:table

Since I'm not sure where this belong (SVG, CSS, CDF), I'll just copy
both mailing lists.

Thanks, Anne for the quick response.  I'm going to have to mull this
over and try to understand the CSS link you've pasted.

What's odd (to me) is that the opposite test case works as I expected:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  <style type="text/css">* { border-style:solid }</style>
  <body>
  <table>
    <tr>
      <td>
        <p>Paragraph One</p>
        <p>Paragraph Two</p>
        <p>Paragraph Three</p>
        <p>Paragraph Four</p>
        <p>Paragraph Five</p>
        <p>Paragraph Six</p>
        <p>Paragraph Seven</p>
      </td>
    </tr>
    <tr>
      <td>
        <svg version="1.1" height="40px" width="100%"
xmlns="http://www.w3.org/2000/svg" >
          <rect x="0" y="0" width="100%" height="100%" fill="red" />
        </svg>
      </td>
    </tr>
  </table>
</body>
</html>

In the above XHTML file, both Opera and Firefox size the width of the
column containing the SVG to the maximum needed to display the HTML
(if the HTML text wraps, then the SVG is appropriately resized).

Any idea how I would accomplish the same thing in the "height" case?
I want the SVG's height to be sized according to the tallest cell in
the table (not a static 150px).

Thanks again,
Jeff


On 1/2/07, Anne van Kesteren <annevk@opera.com> wrote:
> On Tue, 02 Jan 2007 22:45:08 +0100, Jeff Schiller <codedread@gmail.com>
> wrote:
> > Firefox 1.5, 2 and 3 (latest nightly) consider the <svg> element's
> > height of 100% to be the height of the browser window.
>
> That's a bug. I think it's known.
>
>
> >  Opera 9
> > considers the <svg> element's height of 100% as a static 150 pixels in
> > this instance (?).
>
> http://www.w3.org/TR/2006/WD-CSS21-20061106/visudet.html#inline-replaced-height
> suggests that is correct.
>
>
> --
> Anne van Kesteren
> <http://annevankesteren.nl/>
> <http://www.opera.com/>
>

Received on Tuesday, 2 January 2007 22:04:21 UTC