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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ohaya

    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
  • Harlan Messinger

    #2
    Re: What happens when width and height are '0px'?

    ohaya <ohaya_NO_SPAM@ NO_SPAM_cox.net > wrote:
    [color=blue]
    >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;"[/color]

    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.

    Comment

    • ohaya

      #3
      Re: What happens when width and height are '0px'?



      Harlan Messinger wrote:[color=blue]
      >
      > ohaya <ohaya_NO_SPAM@ NO_SPAM_cox.net > wrote:
      >[color=green]
      > >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;"[/color]
      >
      > Try it and see?
      >[/color]


      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

      Comment

      Working...