I'm currently developing XML/XSL to display a row of divs. The number of divs will differ each time and I want them to always be in the same row. Each div represents % of use, so it's essentially 1 div that contains 2 divs. A colored one on the left that takes up the % of use for that item, and a plain white div on the right to fill up the remaining unused time.
My xml looks something like: <item> <usage>50</usage> </item> <item> <usage>75</usage> </item>
and so on.
So I would like my xsl to take these 2 items, create side to side divs. The first div would contain 2 divs of equal width, the second would contain 2 divs with the first taking up 75% and the 2nd 25%.
My question is: Can I use XSL to tell these divs what their width should be? I can use the value of to get the usage number (percentage), but I'm not sure how to make that be the div width.