I have a problem with the HTML fieldset element in Chrome.
I want to have a fixed-height fieldset, and within it a scrollable div. Everything looks fine until I put a legend in – when I do so, the div spills out from the bottom of the fieldset. I also checked in Firefox, and it does not do this (i.e. does exactly what I would expect).
Anyone else seeing this? Is it a Chrome bug? Anyone know if there is a hack for this?
<!DOCTYPE HTML>
<html>
<head>
<title>a</title>
<style>
fieldset {
height: 80px;
}
fieldset div {
height: 100%;
overflow-y: scroll;
}
</style>
</head>
<body>
<fieldset>
<legend>Test</legend>
<div>
Foo!<br/>
Foo!<br/>
Foo!<br/>
Foo!<br/>
Foo!<br/>
Foo!<br/>
</div>
</fieldset>
</body>
</html>

Another solution, if you do not need to use the
legendelement, is to use anh1and style appropriately. This works for me in both Chrome and FF.