Previous Message
Next Message

[css-d] Extra vertical space after styled DIVs in NN 4

Sent by Matt Menees on 31 January 2002 11:11


For the longest time, I've encountered the following problem in NN 4:  I
stack a few DIVs on top of each other, intending for them to sit snuggly,
one below the other.  If one of the DIVs has no style applied, it renders as
intended.  However, once I apply a style (by way of stylesheet OR the style
attribute), a vertical space renders directly below the DIV.

    <div id="someid">
        <table border="1" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td><img src="some_image.gif" /></td>
            </tr>
        </table>
    </div>
    <div id="someotherid">
        <table border="1" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td><img src="some_image.gif" /></td>
            </tr>
        </table>
    </div>

On a hunch, I wrapped a FONT tag around everything, and set its size to 7,
then to 1.  I found that the height of this space changed accordingly, which
suggests that something like a line-break is being thrown in somehow.
Similar to what happens to a pixel-tight table when there's whitespace
before or after a cell's content.

Thanks in advance,
Matt

--
Matt Menees
Previous Message
Next Message