By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,378 Members | 3,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,378 IT Pros & Developers. It's quick & easy.

IE troubles

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
>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

P: n/a
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

P: n/a

"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 discussion thread is closed

Replies have been disabled for this discussion.