Gtk2HTML: Div margins, width and heights

The following example renders a DIV element inside an HTML element:

require 'requestor'
eval''){|x| x.require 'gtk2html' }

s =<<EOF
    * {background-color: green;
    margin: 0.5em;
    padding: 0;
    font-size: 1.3em;
    color: red}
    div {background-color: orange;}
  <div style="height: 10em"></div>
EOF s, irb: true

Here's a screenshot of the Gtk2App rendering the above HTML.

Screenshot of the Gtk2HTML application


  1. When running the same HTML in a web page in Firefox, there is apparently no margin for the HTML element
  2. The unit size of an em in pixels seems to change depending upon the font size.