473,394 Members | 1,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

issues with a floating div.

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?

Oct 26 '06 #1
2 1269
"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.
Oct 26 '06 #2
D'oh.

Am working so much on JS right now that i forgot it was a css issue.

Thanks for the answer, very concise, i will look into it. It turns out
it was the min-height thing that broke it anyway. Very bizzare,
because i only added that because the width/height attributes didnt
work anyway. Whereas now they do.

Once again much appreciated :)

Oct 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: Dave Patton | last post by:
http://members.shaw.ca/davepatton/gps.html In another newsgroup(related to GPS), in regards to the above page, someone said:...
10
by: Vinny | last post by:
I have a few floating point questions/issues I wish to ask. An answer or discussion would be nice too :) Any links discussion the subject would be nice too.. 1. How do I generate an underflow...
31
by: JS | last post by:
We have the same floating point intensive C++ program that runs on Windows on Intel chip and on Sun Solaris on SPARC chips. The program reads the exactly the same input files on the two platforms....
5
by: Anton Noll | last post by:
We are using Visual Studio 2003.NET (C++) for the development of our software in the fields digital signal processing and numerical acoustics. One of our programs was working correctly if we are...
687
by: cody | last post by:
no this is no trollposting and please don't get it wrong but iam very curious why people still use C instead of other languages especially C++. i heard people say C++ is slower than C but i can't...
7
by: Vinoth | last post by:
I'm working in an ARM (ARM9) system which does not have Floating point co-processor or Floating point libraries. But it does support long long int (64 bits). Can you provide some link that would...
17
by: sandeep | last post by:
What error do you get in this? main() { struct emp { char name; float sal; ); struct emp e; int i;
32
by: ma740988 | last post by:
template <class T> inline bool isEqual( const T& a, const T& b, const T epsilon = std::numeric_limits<T>::epsilon() ) { const T diff = a - b; return ( diff <= epsilon ) && ( diff >= -epsilon );...
18
by: Indian.croesus | last post by:
Hi, If I am right Endianness is CPU related. I do not know if the question is right in itself but if it is then how does C handle issues arising out of Endianness. I understand that if we pass...
9
by: Mazdak | last post by:
Hey guys! I recently bumped into a problem when I was calculating with simple additions. I had declared a variable eariler that we'll name "range" here. In a loop range was added "+1". If a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.