It looks like a circular reference caused by the child element with "display:
none". One possible work around is to apply a height to the span.
Reduced Code
<html>
<head>
<style>
#value
{
height: expression((this.scrollHeight < 18) ? '18px' : 'auto');
}
</style>
</head>
<body>
<span id="value" style="width: 60px; height: 0px;">
<input style="display: none;">
</span>
</body>
</html>
Alex Scott [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"William Hurley" wrote:
> I'm seeing an issue with CSS expressions in IE 6. With the following code:
>
> <pre>
> <html>
> <head>
> <title>Untitled</title>
>
> <style>
> div.data_row {
> float: left;
> clear: both;
> width: 95%;
> padding: 3px;
> display: inherit;
> visibility: inherit;
> }
>
> div.data_row div {
> float: left;
> }
>
> div.data_row span.value {
> border: 1px solid #CCCCCC;
> padding: 0px 0px 0px 6px;
> overflow: hidden;
> text-align: left;
> overflow-y: auto;
> height: expression((this.scrollHeight < 18) '18px' : 'auto');
> }
> </style>
>
> </head>
>
> <body>
>
> <div class="data_row">
> <div style="width: 60%;">
> <span class="value" style="width: 60px;"><input id="" name=""
> style="display: none;" type="text" value=""></span>
> </div>
> </div>
>
> </body>
> </html>
> </pre>
>
> When this loads it hangs IE, you have to kill it from the task manager. If
> there is visible element inside span.value then it works fine, it only
> crashes if it is blank. Has anyone else run across this issue or have a
> solution? Right now we're putting in an nbsp at the end, but I don't like
> having to do that.
|