Forum Moderators: not2easy

Message Too Old, No Replies

IE6/7 problem with using parent selectors

         

hadiz

6:30 pm on Sep 17, 2008 (gmt 0)

10+ Year Member



Hello,

I noticed IE 6 and 7 seemingly do not acknowledge the following styling trick. I could always use inline styling, but I was wondering if there's an alternative way to get this to work.


<style type="text/css">
.disclaimer {
font: 12px 'Verdana', sans-serif;
}
.disclaimer > span {
font-weight: bold;
}
</style>

This way, I can have markup that looks like this:

<div class="disclaimer"><span>Disclaimer:</span>

To bold the word "Disclaimer" without having to apply inline styling or another class to the span tag.

Anyway, am I out of luck, or is there a way (other than the less favorable alternatives I mentioned) to get this to work in IE?

Thanks.

swa66

7:19 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try

.disclaimer span {...}

Of course it'll also match "

<.. class="disclaimer"><p><span>here ...
"

Or try the IE7.js scripts to add the functionality to IE using javascript.