Closed Thread Icon

Preserved Topic: DIVs don't "stretch" in NN? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20440" title="Pages that link to Preserved Topic: DIVs don&amp;#039;t &amp;quot;stretch&amp;quot; in NN? (Page 1 of 1)" rel="nofollow" >Preserved Topic: DIVs don&#039;t &quot;stretch&quot; in NN? <span class="small">(Page 1 of 1)</span>\

 
Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 02-18-2002 05:01

Greets -

I've got a DIV, with a specified height (850px). Inside the DIV are several tables (that will be converted to DIVs later). In IE, everything works fine. In NN 6.x, the content is a little longer than the 850. The result is that the content overlaps the bottom of the DIV.

I could make the DIV higher, but that causes other problem (unrelated).

My STYLE info for the DIV looks like this:

#rightnav {
border: 1px solid #999;
background-color:#ffffff;
color:#000;
padding: 2px;
position:absolute;
width:145px;
height: 850px;
top:132px;
right:0px;
}

Ideas?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-18-2002 06:08

This is actually an IE bug. See, "width" and "height" are supposed to specify the width and height *without* padding and borders, and the padding and borders are supposed to add to the width and height specified. In IE (with the exception of IE 6 when you're using a DOCTYPE tag), it takes into account the padding and border incorrectly. NN6/Mozilla is correct here.

A commonly used fix is described at http://www.tantek.com/CSS/Examples/boxmodelhack.html .

If you think the *correct* behavior is annoying, as I do, wait for the box-width and box-height CSS properties to start being supported; they specify the width and height of the content, padding, borders, and margins. (not sure about the margins actually.)

[edit: this thread should have been in the CSS forum.]

[This message has been edited by Slime (edited 02-18-2002).]

velvetrose
Paranoid (IV) Inmate

From: overlooking the bay
Insane since: Apr 2001

posted posted 02-20-2002 03:57

slime, i followed the link you posted and got a window:
This page is accessing information that is not under its
control. This poses a security risk. Do you want to
continue?

How big a security risk is this? I followed Ini's suggestion in a different thread
and may have gone overboard and no, I didn't note what I had changed

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-20-2002 04:15

No idea. The page is static, no script tags in it even.

« BackwardsOnwards »

Show Forum Drop Down Menu