I'm trying to create an HTML that has an inline SVG that has an element with a CSS background:
<html>
<body>
<svg>
    <foreignObject width="50" height="50">
        <div style="red; width:50; height:50"></div>
    </foreignObject>
    <rect width="50" height="50" transform="translate(100,0)" style="red"/></svg>
</body>
</html>
For the foreighObject the background is shown, but not for the rect
Why is that?
What I'm eventually trying to achieve is to have a sprite image as the background for several images in the SVG
EDIT: Eventually I want the fill to be a piece of a large image and not just red. It looks like that's not possible with just fill
 
     
    