I want to set in %
the height
of a div
included in a fieldset
,
but browsers don't calculate the same way the inside height of the fieldset
when you use legend
!
Firefox: height: 100%
consider the height of the legend: it's ok.
Chrome: height: 100%
does NOT consider the height of the legend: it overflows.
Internet Explorer: height: 100%
does NOT consider the height of the legend: it overflows.
1. Do you know a clean solution to have the same result in the 3 browsers?
2. Which is right compared to W3C recommendations?
Here is the code used to make the test:
<html>
<body>
<fieldset style="height:60px;width:150px;">
<legend>Legend</legend>
<div style="height:100%;width:100%;margin:0;padding:0;background-color:#FF0000;">
DIV : height 100%
</div>
</fieldset>
</body>
</html>