Anyone know why this doesn’t work right in Windows???
<?xml version=”1.0″ encoding=”UTF-8″?>
<?xml-stylesheet href=”chrome://global/skin/” type=”text/css”?>
<?xml-stylesheet href=”chrome://browser/content/bookmarks/bookmarks.css” type=”text/css”?>
<?xml-stylesheet href=”chrome://browser/skin/browser.css” type=”text/css”?>
<page id=”apage” title=”Buzz View”
xmlns=”http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul”
xmlns:rdf=”http://www.w3.org/1999/02/22-rdf-syntax-ns#”
onload=”">
<vbox flex=”1″ id=”mainWrapper” style=”background-color: #F00;”>
<vbox id=”bottomBox” class=”featureBox”>
<description class=”boxLabel” id=”bottomBoxLabel” flex=”1″ >a description</description>
<listbox id=”buzzItemListBox2″ class=”aListBox” flex=”1″ style=”background-color: transparent;”>
<listitem label=”This is an item…”/>
</listbox>
</vbox>
</page>
This is a XUL file that puts a listbox control on a page. I’m working on a sidebar for Firefox and this is busted in Windows. Basically, the listbox should be transparent and show the red background. Instead, on Windows, Firefox shows a white background for the listbox. On the Mac, it shows the red background as I’d expect. This is driving me nuts. The last thing I expected from Firefox is a cross-platform issue this basic.
I suspect it has to do with the underlying OS control being used as a listbox, but still… come on, this is simple CSS. ![]()






May 18th, 2005 at 12:34 am
Hey,
I am a little confused with what you are trying to do. Are you trying to make the background of the mainwrapper red or the background of the just the listbox red?
From what I see (and I totally could be wrong on this) is that you have one vbox (on top) that has a red background and another one (below it) without a background color? Would it help to nest the vbox?
a description
This would give the entire outer vbox the red background color.
You could move the style to the second vbox to just put a red background around the description and the listbox:
a description
Or, if you want it in just the listbox you could try putting it with the item itself.
a description
I am not sure if this is what you want to do or not. Sorry I can’t be too much help with these things.
May 18th, 2005 at 12:40 am
hmmm, my code didn’t show. I guess I cant cut and paste the cose without it trying to interpret it.
let me try it again.
a description 1:
<vbox flex=”1″ id=”mainWrapper” style=”background-color: #F00;”>
<vbox id=”bottomBox” class=”featureBox”>
<description class=”boxLabel” id=”bottomBoxLabel” flex=”1″ >a description</description>
<listbox id=”buzzItemListBox2″ class=”aListBox” flex=”1″ style=”background-color: transparent;”>
<listitem label=”This is an item…”/>
</listbox>
</vbox>
</vbox>
May 18th, 2005 at 12:43 am
a description 2:
<vbox flex=”1″ id=”mainWrapper”>
<vbox id=”bottomBox” class=”featureBox” style=”background-color: #F00;”>
<description class=”boxLabel” id=”bottomBoxLabel” flex=”1″ >a description</description>
<listbox id=”buzzItemListBox2″ class=”aListBox” flex=”1″ style=”background-color: transparent;”>
<listitem label=”This is an item…”/>
</listbox>
</vbox>
</vbox>
a description 3:
<vbox flex=”1″ id=”mainWrapper”>
<vbox id=”bottomBox” class=”featureBox”>
<description class=”boxLabel” id=”bottomBoxLabel” flex=”1″ >a description</description>
<listbox id=”buzzItemListBox2″ class=”aListBox” flex=”1″ style=”background-color: transparent;”>
<listitem style=”background-color: #F00;” label=”This is an item…”/>
</listbox>
</vbox>
</vbox>
May 18th, 2005 at 12:44 am
let me know if you figure it out.
May 18th, 2005 at 9:55 am
the whole page should be red, including the background of the listbox. Ideally, the listbox would be transparent (there is a background image in my actual code that I would like to have show through the listbox…
Did one of your examples above turn the listbox red? Not just the item, but the listbox…?
May 18th, 2005 at 8:58 pm
Maybe you should try the tag “stack”. It may be the best bet. This is how I got it to work for Windows, but you have to redo the alignment. Hope this helps.
<vbox flex=”1″ id=”mainWrapper” style=”background-color: #F00;”>
<description class=”boxLabel” id=”bottomBoxLabel” flex=”1″ >a description</description>
<stack>
<listbox id=”buzzItemListBox2″ class=”aListBox” flex=”1″ style=”background-color: transparent;”>
<listitem label=”This is an item…”/>
</listbox>
<vbox id=”bottomBox” class=”featureBox” style=”background-color: #F00;” ></vbox>
</stack>
</vbox>
May 18th, 2005 at 9:41 pm
I just noticed that my original post was busted by WordPress when I first typed it in (Forgot to covert the angle brackets into > etc.) The tag complete completely hosed up my example…
But, I will try the stack tag with my example code. Thanks for working on this…
Sujal
May 18th, 2005 at 9:58 pm
didn’t work… I’ll update this later with the correct example code… it’s on my computer at work and I forgot to copy it to my thumb drive.