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

What happens when width and height are '0px'?

P: n/a
Hi,

I was wondering what happens when width and height in a style (e.g., in
a DIV) are set to '0px'? For example something like:

style="position: absolute; width: 0px; height: 0px;"

Thanks,
Jim
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ohaya <ohaya_NO_SPAM@NO_SPAM_cox.net> wrote:
Hi,

I was wondering what happens when width and height in a style (e.g., in
a DIV) are set to '0px'? For example something like:

style="position: absolute; width: 0px; height: 0px;"


Try it and see?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #2

P: n/a


Harlan Messinger wrote:

ohaya <ohaya_NO_SPAM@NO_SPAM_cox.net> wrote:
Hi,

I was wondering what happens when width and height in a style (e.g., in
a DIV) are set to '0px'? For example something like:

style="position: absolute; width: 0px; height: 0px;"


Try it and see?

Harlan,

I think that I've kind of figured out what's going on.

It turns out that there was an 'onload' event handler that was suppose
to resize the area from the 'width: 0px; height: 0px;" when the onload
event fired. I had missed it :(.

The problem that I'm still trying to work out is that when the 'content'
in the area is 'large' (I haven't figured out exactly how large yet, but
a 7MB content does it), and when IE6 is the browser, the page with the
'width: 0px; height: 0px;" seems to hang (I actually ran a test
overnight earlier - CPU utilization was 100% on the client), so it seems
like it was never getting to fire the onload event.

Setting 'width: 1px; height: 1px;' seems to get it working again, but
I'm curious if anyone has ever run across this problem before. Is it a
known problem with IE6?

Thanks,
Jim
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.