I have been trying to create a code like this:
If you show ‘us.gif’ in the div id ‘yourCountry’, display this css code:
— #yourCountry img{display:none} —
End of the if
I have tried to do it and searched about it on the web, but nothing has worked for me.
This is how I was attempting to achieve it with javascript (I am a newbie with javascript):
<script language=javascript>
<!--
function usimage () {
if document.images["us.gif"] {
document.write("
<style type="text/css">
<!--
body div div div div div div div div form div div div table td img{display:none;}
-->
</style>
");}}
</script>
That JS is a bit messy, would a CSS 2.1 selector be acceptable?
div#yourCountry img[src="us.gif"] { display:none; }