You don't have jQuery on that page, but you do have Prototype. It too uses $, but that's only for javascript, it has nothing to do with stylesheets. It can affect style, but must do so via javascript.
Now, these:
Code:
div.alinea a:contains(img) {
background-image : none;
}
div.alinea $("a:has(img)") {
background-image : none;
}
do nothing in any browser. They're invalid and ignored. The fact that IE 8 doesn't show the box with the arrow is because in that browser it's behind the image. IE 9 and Firefox both show the box with the arrow. If you remove those two rules, IE 8 will still not show the box with arrow for those links.
Since you cannot use normal css methods (class is blocked you say, and there is no selector that determines if an element has a descendant), you can use Prototype. Put this script on the page:
Code:
<script type="text/javascript">
document.observe("dom:loaded", function() {
// remove background image from links with image tags
$$('div.alinea a').each(function(s){
if(s.down('img')){
s.setStyle({backgroundImage: 'none'});
}
});
});
</script>
or put its highlighted code in an external script and associate it with the page via an external script tag.
That only works if the user has javascript enabled, but most do, and having that little box with an arrow for those few that don't have javascript is really no big deal.
It's fairly certain that by making the links display block and setting their background position to top left, that the image will cover the box with an arrow for all browser as it currently does in IE 8, but that would probably cause layout problems elsewhere for the external links without images.
BTW - I looked at the page in IE 7 mode too, no box with arrow, but the layout gets really messed up.
Also - I don't see any external links without images, why not get rid of that rule altogether? You don't seem to be using it, at least not on that page.
Edit: If you want it to layout just like IE 8, add display block:
Code:
s.setStyle({backgroundImage: 'none', display: 'block'});
Notes: IE 7 will still be messed up, this has nothing to do with the other problems in that browser, which are a separate issue. IE 7 already had this part 'right'. Also, doing this will not mess up IE 8.
Bookmarks