"daveyand" <an**********@gmail.comwrote in comp.lang.javascript
:
Hey Guys
I have the following div setup
<div id="gray_div" onclick=this.parentNode.style.display="none";
style="border: 1px solid black;position: absolute;top:
1px;right:1px;min-width:100;min-height: 200;background-color:
#000;filter:alpha(opacity=40);-moz-opacity: 0.4;opacity:
0.4;z-index:899;"></div>
In FF it does what the css expects, that is to say it creates a semi
transparent gray box over the screen.
But when i view it in IE 7 it doesnt work, in that it doesnt display
it the same way, only a 1px square top right ofscreen.
Any idea what might be up?
1. You are asking a question only relevant to the CSS newsgroup (see
followup-to header)
2. The only Javascript you offer is an event attribute that is
untestable since there is no parent node to test, unless it is the body.
It also appears to violate the HTML recommendation for specifying HTML
element attributes, whose attribute value should be quoted.
3. As far as your CSS question, you are likely making use of properties
not part of the realistically implemented CSS recommendation of these
http clients. For example, -moz-opacity is an extension of CSS used in
'Moz'illa-based http clients, which includes Firefox.
http://www.w3.org/TR/CSS2/indexlist.html
Also, MSIE is reckless about its implementation of CSS in general,
whether level 1, 2, or 3 recommendation. For instance, the min-XXXXX
properties are probably a foreign language to the Microsoft http client
versions (I have not bothered to download ver 7).
You have read CSS Level 1 and 2 recommendations, haven't you? It
probably takes a week of browsing to get through it. You will want to
run the W3 test suites to understand what your http clients do in
conforming to the recommndations, both in CSS1 and CSS2. I suggest you
become familiar with these before you post in the CSS newsgroups and
that you always present documents validated for HTML and CSS before
asking those others to look at them. Some of the regulars there can
get very nasty.