views:

29

answers:

2

I have the following code which builds a JQueryUI Dialog popup.

$j('<div></div>')
        .html(message)
        .dialog({
           autoOpen: true,
           bgiframe: true,
           buttons: { 'Dismiss': function() { $j(this).dialog('close') } },
           closeOnEscape: true,
           height: 'auto',
           modal: true,
           resizable: true,
           width: 400,
           title: 'An error has occurred'});

When the popup is first displayed to the user it looks like the image below, with a giant header. I know that no additional css classes are being added to the popup.

After I resize the JQuery popup the popup appears correctly. The header is immediately resized and displays properly.

Has anyone else ran into this before?

alt text

+2  A: 

I've never run into that problem before, but I would suggest two things:

If you want to fix the symptoms and not the issue, you could just do a style override:

.ui-widget-header { height: 100px }

You could also try removing your options one at a time to see if one of them is causing the issue.

Will
I did try systematically removing the options and none of those appear to be the issue. Good looking out though. If I cannot figure it out I guess I could override each style. Seems a bit of a work around though, huh?
Mike Fielden
Yeah, it certainly is, but unfortunately for a last resort it's often your only one...The only other issue I could think of would be conflicting styles or scripts that you created. Do you have any styles applied to all spans or divs that would affect it?
Will
Not that I can see. According to Firebug nothing is applied to it, well only JQuery styles.
Mike Fielden
Two things: can you provide a link to the page and are you sure your jQuery and jQuery UI? That looks like regular redmond, so I don't see a problem there... perhaps closer inspection of the page would help.
Will
Oops, unfinished thought there. *jQuery and jQuery UI are up to date
Will
A: 

Just updated to the latest UI CSS and worked like a champ... Thanks for your help Will

Mike Fielden