开发者

Overide inline font face?

Im imp开发者_如何学JAVAorting an XML feed which has inline styles applied to its divs like:

 face="Verdana"

I want to override this with CSS. Ive tried this:

#containing-div div {  
    font-family: arial !important; 
}

But its not working. As 'face' is deprecated I'd hoped it would be overridden with the 'font-family' but it appears not to be. Given that I can't change the XML feed (I know I should be able to but just trust me!), how can I override this? Thanks


Assuming that this:

face="Verdana"

is actually this:

<font face="Verdana">..</font>

(and it must be, right? There's no way it's <div face="">)

then you should use this CSS:

#containing-div, #containing-div font {  
    font-family: arial; 
}

There should be no need for !important. The point is to select the font elements.


The problem might be the "XML" part. Can you set other properties with the #containing-div div selector, like background or border? If not, the selector might not match, because the ID is not correctly defined by the XML fragment or the namespaces don't match.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜