2

I am trying to edit my dialog box to have a transparent title bar that still shows an alternate 'X' to close it, but I am having issues here is my dialog css as of now:

/* Creates the 'X' used to close dialog */
.ui-widget-header .ui-icon 
{
    background-image: url("../Images/X.png") !important;
}  

/* Removes padding from title bar */
.ui-dialog .ui-dialog-titlebar 
{
    padding: 0;
    position: relative;
}
/* Remove title image and keep 'x' */
.ui-widget-header {
    background: transparent repeat-x scroll 50% 50% #F6A828;
    border: 1px solid #E78F08;
    color: #FFFFFF;
    font-weight: bold;
}

As of now the transparent does not over ride the default color (adding !important doesn't change anything either) and the 'x' does not show up (though the default doesn't either). Any suggestions?

EDIT: This link shows the dialog box with my code. Notice how the background is not transparent when it runs. After playing around with it for a bit, I think the image is loading, but I just cannot see it (the colors are very similar) so I think once the title color is resolved that issue will go away as well

2
  • I think it works here: jsbin.com/ikaho5 try to put your code there, show us the problem Commented Apr 19, 2011 at 18:12
  • 1
    background: transparent repeat-x scroll 50% 50%; Commented Apr 19, 2011 at 18:28

2 Answers 2

1

As you wish

background: transparent repeat-x scroll 50% 50%;
Sign up to request clarification or add additional context in comments.

Comments

1

Here is something i've done before, not removing the title image, but shrinking it to only contain the 'X'. and all done in the js when opening.

    $('#dialog').dialog();
var d = $('#dialog').dialog('open');

var titleBar = d.parent().find('div.ui-dialog-titlebar');
d.parent().find('span.ui-dialog-title').text('');
titleBar.css({
    'width' : '10px',
    'height' : '10px',
    'float' : 'right',
    'top' : '-35px'//only used to move x above dialog. not needed.
});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.