Well really the only programmatic way of handling this, with those
requirements, would be to set the overflow to hidden and allow the
contents of the dialog to overflow, which would then have to be
monitored some way. There's a plugin out there that 'watches' styles
and widths and such, but the last time I played with it, it didn't
work very well.
That's a shame though that you're not willing to implement at least a
partial solution. Some is better than none.
2009/11/7 Scott González <
scott.gonzalez@gmail.com>:
> Thanks for explaining that. An official solution would have to work with
> someone dynamically changing the content, like height: 'auto' does. It seems
> like everyone agrees meeting that requirement wouldn't be possible
> cross-browser. I'll close the ticket tonight or tomorrow unless someone
> thinks we can actually implement this. If someone figures it out later we
> can always add it in.
>
>
> On Sat, Nov 7, 2009 at 3:53 PM, Andrew Powell <
powella@gmail.com> wrote:
>>
>> Sure.
>>
>> When I mentioned that it doesn't solve auto width, I was speaking
>> towards the css-based solution. It is a programmatic solution, though.
>>
>> You're correct that I'm setting a specific width during init. It does
>> not allow for the dialog changing widths dynamically once the dialog
>> is initialized.
>>
>> css:
>> fieldset { min-width: 400px; position: absolute; top: -10000px; left:
>> -10000px; } /* for ie6 just set width: 400px; */
>>
>> html:
>> <fieldset>
>> ....
>> </fieldset>
>>
>> This allows for me to always have dialogs on my site at least 400px
>> wide, which happens to be the decided upon standard size for the
>> particular app this was designed for. One could do without that
>> particular css attribute, however. This also allows me to apply
>> another css class to the element in html to override the size if I
>> want to set it absolutely, and allows the fieldset to grow
>> horizontally based on the content - but before the dialog has been
>> init'd.
>>
>> My wrapper function then measures the width and sets it within the
>> .dialog(...) init params.
>>
>> So to reiterate, it allows for a semi-dynamic width *before* the
>> dialog is initialized. What this does, is take the thinking out of
>> having to set the width, or figure out what the width is - takes out
>> some busy work - and in apps with a large volume of dialog use, it's
>> nice to have.
>>
>> Now I would assume that this is the most common use case for the
>> width: auto; setting, but then I've never had an alternate use for
>> width: auto. I'd just rather not have to think about figuring out and
>> setting the width explicitly each time I need to use the dialog.
>>
>> 2009/11/7 Scott González <
scott.gonzalez@gmail.com>:
>> > On Sat, Nov 7, 2009 at 1:56 PM, Andrew Powell <
powella@gmail.com>