I’m working on a very simple Firefox extension that will log info and dynamically append them to a basic HTML table in a XUL window.
Everything works except for the CSS styling for the HTML table. None of them are being applied. I read somewhere to add -moz-appearance: none; to the CSS, but it still doesn’t work. Does anyone see what is wrong with this set of XUL and CSS files?
XUL file
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://rmtagfinder/content/log_window/log_window.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://rmtagfinder/locale/translations.dtd">
<window id="rm-tag-finder-log-window"
title="&rmtagfinder.app.name;"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox flex="1" style="overflow:auto" >
<html:table cellspacing="1" cellpadding="4" bgcolor="#CCCCCC" border="0" id="rm-tag-finder-log-window-html-table">
<html:thead>
<html:tr class="tbl_header">
<html:td width="100">Time</html:td>
<html:td width="100">Domain</html:td>
<html:td width="200">Request Made</html:td>
<html:td width="200">Referer</html:td>
<html:td width="200">Decoded Info</html:td>
</html:tr>
</html:thead>
<html:tbody></html:tbody>
</html:table>
</vbox>
</window>
CSS file
@import url("chrome://global/skin/");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.tbl_header {
-moz-appearance: none;
font-weight: bolder;
font-family: Arial, Verdana, Helvetica;
font-size: 8pt;
color: #fcfcfc;
background-color: #4F80AB;
}
tr {
vertical-align: top;
}
td {
vertical-align: top;
}
I got it working soon after, here’s the solution. I have to add in the following line to the CSS file so that it would recognize the CSS styles in the html namespace: