473,387 Members | 1,834 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,387 software developers and data experts.

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

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
2 2704
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


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tony Vasquez | last post by:
What is the best way to center one, or more DIVs in the browser window? Can someone give me a quick code snipplette. I need something that will center the DIV, for all sorts of awkward screen...
2
by: FrankStallone | last post by:
I am just getting started in XML and I made my first xml, dtd and xslt file and XML spy said they were all valid and they worked. This was the xslt doc that worked. <?xml version="1.0"...
3
by: stan | last post by:
I have code that produces 5 boxes across the screen width. So far I have only tested it in IE 6 and NS 8. It works in IE, but in NS I am not able to fit in the 5th box. I am using two...
1
by: davidr | last post by:
Hi, I am using Divs with CSS to setup a layout for a site. I am using the <Div>s and style sheets below. I want the TopMenu to go across the entire top of the browser. It does go across the...
4
by: _Raven | last post by:
Okay, I am playing with submitting forms with Ajax. I am trying to adapt this script to my forms: http://www.captain.at/howto-ajax-form-post-get.php I have included my code at the bottom of this...
1
Chrisjc
by: Chrisjc | last post by:
I have a group of drop downs and on one of my DIV I have a set message to me displayed how ever with Select Fuel it is not work... http://triplesource.net/db/IntakeSytemstest.php That is the...
5
by: Agix | last post by:
Hi there, Please check out : http://clarifysolutions.co.uk/certenroll/ The source is included below. This page is a test, so I can play about with paddings, margins and layouts using divs as...
4
by: Ty | last post by:
Hello all, I am creating a web site with Visual Stuido 2008. I am trying to use a java script file to create a busybox for login from this page http://blogs.crsw.com/mark/articles/642.aspx. I...
1
by: kailashchandra | last post by:
Below is my code.i want the first division should be load when window is loading. <HTML> <HEAD> <script> function tabFunc(getthis) { var getIn=getthis.innerHTML; var...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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
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
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...

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.