Loading ...
Sorry, an error occurred while loading the content.
 

SVG in a XHTML:table

Expand Messages
  • Jeff Schiller
    I have a question about XHTML+SVG when it comes to laying out SVG in a HTML:table. Here s my minimal test case. I ve also sent the question to the www-svg
    Message 1 of 1 , Jan 2, 2007
      I have a question about XHTML+SVG when it comes to laying out SVG in a
      HTML:table. Here's my minimal test case. I've also sent the question
      to the www-svg and public-cdf lists:

      <?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 border="1">
      <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>
      <td>
      <svg version="1.1" width="40px" height="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>

      Firefox 1.5, 2 and 3 (latest nightly) consider the <svg> element's
      height of 100% to be the height of the browser window. Opera 9
      considers the <svg> element's height of 100% as a static 150 pixels in
      this instance (?). Both seem wrong to me - it seems like the browser
      should take 100% to mean the "tallest element in the table's row"
      (which would be defined by the seven HTML:p elements in the other cell).

      Can someone tell me what the spec states about the file above and what
      SHOULD happen? I can do the browser bug opening, if required...

      Thanks,
      Jeff
    Your message has been successfully submitted and would be delivered to recipients shortly.