IE 9 ignoring CSS rules

2019-04-26 14:18发布

I have this weird issue with IE9 where it is ignoring certain CSS rules on its own. Even IE8 loads it correctly. So does IE 10 and all the nicer browsers like FF and Chrome.

The css is being loaded with "text/css" MIME.

For example,

These rules are not being applied by IE9. I cannot find these rules in the developer toolbar CSS tab.

.B2B .info_cart { display: block; clear: both !important; }
.B2B .info_cart .priceDetail { font: 14px/22px Arial,Helvetica,sans-serif; padding-left: 3px; }
.B2B .info_cart .priceInfo { bottom: 2px; font-size: 10px; line-height: 24px; margin: 0 0 0 2px; overflow: hidden; padding: 0; position: absolute; word-wrap: break-word; }
.B2B .info_cart .info_vat { font-size: 10px; float: right; margin-top: 7px; }

The relevant HTML:

<div class="info_cart clearfix">
    <span class="spanBasketInfo"></span>
    <span class="cartValue"></span>
    <span class="cartShippingDetails"></span>
    <span class="info_vat">
        <span class="exc">exc. VAT</span>
        <a href="#">(change)</a>
    </span>
</div>

What could be wrong?

UPDATE This is the Doctype I am using, if it helps.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="sv" xmlns="http://www.w3.org/1999/xhtml" class=" js no-touch borderradius boxshadow textshadow opacity cssgradients csstransitions">

7条回答
我想做一个坏孩纸
2楼-- · 2019-04-26 15:03

Have you tried removing the .B2B from your CSS? That seems to be the problem by looking at your example..

So instead of this

.B2B .info_cart { display: block; clear: both !important; }

Try this

.info_cart { display: block; clear: both !important; }
查看更多
登录 后发表回答