473,405 Members | 2,334 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,405 software developers and data experts.

IE troubles

I have two functions both work in Firefox and Netscape but only one works in
IE. Both are working on different <DIV> tags. My CSS is an external file, I
linked it to the html file.

CSS
div.a
{
width: 1%;
background-color: #9900FF;
height: 5%;
}
div.b
{
width: 100%;
background-color: #95F209;
height: 1%;
}

JavaScript

function doWidth()
{
var Wdiv = document.getElementById("width");
Wdiv.style.width = forWidth+'%';
if(forWidth++ > 99)
forWidth = 0;
setTimeout("doWidth();",10);
}

function doHeight()
{
var Hdiv = document.getElementById("height");
Hdiv.style.height = forHeight+'%';
if(forHeight++ > 10)
forHeight = 0;
setTimeout("doHeight();",10);
}

HTML

<div id=width class="b">&nbsp;</div>
<BR>
<div id=height class="a">&nbsp;</div>
can someone point out my mistake here?
Jan 24 '06 #1
3 1208
>I have two functions both work in Firefox and Netscape but only one works
in IE. Both are working on different <DIV> tags. My CSS is an external
file, I linked it to the html file.

CSS
div.a
{
width: 1%;
background-color: #9900FF;
height: 5%;
}
div.b
{
width: 100%;
background-color: #95F209;
height: 1%;
}


I did not know that I was suppose to place [position: absolute;] in my CSS
but when I tried it out of dumb luck it worked.
Jan 24 '06 #2
News wrote:
I have two functions both work in Firefox and Netscape but only one works
in IE. Both are working on different <DIV> tags. My CSS is an external
file, I linked it to the html file.

CSS
div.a
{
width: 1%;
background-color: #9900FF;
height: 5%;
}
div.b
{
width: 100%;
background-color: #95F209;
height: 1%;
}

I did not know that I was suppose to place [position: absolute;] in my CSS
but when I tried it out of dumb luck it worked.


Dumb luck? In other words, you have no idea why it didn't work in the
first place, nor why your 'fix' has made it work now. There is no need
at all to put position: absolute in the CSS to make it work (at least as
far as I can tell).

You never explained what the script was supposed to do, nor what the
symptoms of not working in IE were. Setting position to absolute in the
CSS likely has far more consequences than you realise and probably
hasn't 'fixed' whatever was wrong in the first place.

Your issue is much more likely due to CSS, post in
comp.infosystems.www.authoring.stylesheets to find out about that and
why position: absolute should rarely be used.
--
Rob
Jan 25 '06 #3

"RobG" <rg***@iinet.net.au> wrote in message
news:UR*****************@news.optus.net.au...
News wrote:
I have two functions both work in Firefox and Netscape but only one works
in IE. Both are working on different <DIV> tags. My CSS is an external
file, I linked it to the html file.

CSS
div.a
{
width: 1%;
background-color: #9900FF;
height: 5%;
}
div.b
{
width: 100%;
background-color: #95F209;
height: 1%;
}

I did not know that I was suppose to place [position: absolute;] in my
CSS but when I tried it out of dumb luck it worked.


Dumb luck? In other words, you have no idea why it didn't work in the
first place, nor why your 'fix' has made it work now. There is no need at
all to put position: absolute in the CSS to make it work (at least as far
as I can tell).

You never explained what the script was supposed to do, nor what the
symptoms of not working in IE were. Setting position to absolute in the
CSS likely has far more consequences than you realise and probably hasn't
'fixed' whatever was wrong in the first place.

Your issue is much more likely due to CSS, post in
comp.infosystems.www.authoring.stylesheets to find out about that and why
position: absolute should rarely be used.
--
Rob


OK I will thanks
Jan 26 '06 #4

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

Similar topics

33
by: Darren Dale | last post by:
I love the language. I love the community. My only complaint is that Python for Windows is built with Visual Studio. It is too difficult to build python, or a module, from source. This is what...
0
by: lmckaha | last post by:
Hi, Mysql version: 3.23.49 Solaris version: 2.7 gcc compiler version: 2.95.2 Python : 2.2.2 I'm evaluating the C and C++ API to decide which one to bye but I have many troubles.
3
by: Mr. B | last post by:
GRRRR... I've run across a situation in which I have NO solution. Hopefully there is one. VB.net. It's rather simple. I've a ComboBox that get's populated via a Database. And I pre-select...
4
by: jernej goricki | last post by:
Hy I'm trying to edit a XSLT document, just like I'm editing a XML document : (Im trying to make a new xsl:template tag here ) Dim myXml As New XmlDocument()...
4
by: Edwin G. Castro | last post by:
I want to start a process from a C# application. I also want to redirect standard error to standard output so that I can read output from both streams just like I could from a command line. In...
0
by: Stefan Slapeta | last post by:
Hi all, I've experienced some troubles with message tables and wanted to know if anybody knows a solution for one of them: - If I translate my .mc file into a Unicode .bin file, some of the...
0
by: D'ALMEIDA Jorge | last post by:
Well i'm trying to get the icon of the visibles windows. i'm using: EnumWindows, IsWindowVisible, and SendMessage with the "WM_GETICON" parameter sometimes then SendMessage function return...
0
by: Michal | last post by:
I have troubles with instaling .Net Framework 2.0 (Beta 2 - 2.0.50215). The main instalation went just fine, troubles begin with my attemt to run aspnet_regiss.exe -i. Asp.Net is instaled into IIS...
0
by: JohnIdol | last post by:
VC++6 to VC++2003 - linking troubles -------------------------------------------------------------------------------- Hi All, I successfully ported an application from VC++6 to VS2003. Solved...
1
by: Pegasus | last post by:
Good morning, I'm Filippo Battaglia. We're porting Apache STDCXX under Nanodesktop. We are trying to make nd compatible also with C++ and not only with C. Unfortunately, we're finding different...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.