problem with height of <div>

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi,

this code renders correctly the height of the white <div> with IE 7. With IE
6, the height is bigger. Look at yourself in the file div.doc i sent with.

Unfortunately for us, IE 6 is still used frequently. Any way to solve that
problem using IE 6?

Thanks
Chris

<body>
<div style="background-color:green">green</div>
<div style="height:3px; background-color:white" ></div>
<div style="background-color:red" >red</div>
</body>
 
this code renders correctly the height of the white said:
IE
6, the height is bigger. Look at yourself in the file div.doc i sent with.

Unfortunately for us, IE 6 is still used frequently. Any way to solve that
problem using IE 6?

Try adding 'overflow:hidden' to the div style

<div style="height:3px; background-color:white; overflow:hidden;" ></div>

This may fix it.
 
thanks, this solves it.

Ian Haynes said:
Try adding 'overflow:hidden' to the div style

<div style="height:3px; background-color:white; overflow:hidden;" ></div>

This may fix it.
 
Back
Top