Forum Moderators: open

Message Too Old, No Replies

DIV in TABLE extra space problem

NE 4.61 I cannot get rid of a extra space when use DIV and FORM in a TABLE

         

freak_out

3:30 am on Feb 10, 2002 (gmt 0)



Please try this code for a visual explanation of what's wrong with TABLE, DIV and FORM in NE 4.61

<table><tr><td bgcolor="blue">
<div id="form" style="position: relative;layer-background-color:#FF0000;clip:rect(0,80,30,0);">
<form>
<select>
<option>zero
<option>one
<option>two
<option>three
</select>
</form>
</div>
</td></tr></table>

Can you see the blue space under the select control?

tedster

10:11 am on Feb 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World. Nice to have you join in.

I tested your code, and I see the blue in every browser I try. But the only place I see the red div background is NN 4.7.

Marshall

2:33 pm on Feb 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



freak_out,

I'm not sure what effect you're looking for here. The only way I got it to look uniform was like this:
<div id="form" style="position: relative;layer-background-color:blue;clip:rect(0,80,30,0);">
<form>
<table><tr><td bgcolor="#FF0000">
<select>
<option>zero
<option>one
<option>two
<option>three
</select>
</td></tr></table>
</form>
</div>

However, that did not show any blue in any browser. Are you trying for a red option field in a blue column or did you want a blue background in the option field.

knighty

9:25 am on Feb 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you are having problems because you are positioning a layer relatively within the table. Netscape doesnt seem to handle it very well.

I would do what marshall has done put the layer outside the table tags and maybe think about using absolute positioning instead.