Welcome Guest Search | Active Topics | Sign In | Register

CSS for Dialog Close Button Options
Ruperto Pasillas
Posted: Wednesday, January 3, 2018 5:38:52 PM
Rank: Newbie
Groups: Member

Joined: 12/27/2017
Posts: 3
The styling of a site I manage uses CSS to change the cursor and :hover of buttons, links, etc. I'd like to apply same style to the Close button of the Dialog component in EO.Web. Is there an existing way to provide a class or in-line style for the close button? If not, can that be added?

Thanks!
eo_support
Posted: Friday, January 5, 2018 5:48:11 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,072
Hi,

The close button is your own button. It's not a part of the dialog. It is linked to the dialog through this property:

https://www.essentialobjects.com/doc/eo.web.dialog.cancelbutton.aspx

Because it's your own button (standard ASP.NET buttons), so you can use whatever method that you use to style a standard ASP.NET button to style the close button.

Thanks!
Ruperto Pasillas
Posted: Monday, January 8, 2018 11:30:45 AM
Rank: Newbie
Groups: Member

Joined: 12/27/2017
Posts: 3
Hello - sorry I didn't detail my question sufficiently. The close button I'm referring to is the small X icon that appears in the Dialog header, not these one I can reference in the Close Button. It appears the style for the close "icon" or X button in the header if fixed, and that's the one I would like to set the style of.

Thanks!
eo_support
Posted: Monday, January 8, 2018 12:51:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,072
Hi,

This is no directly way to do it. However you can still style it with CSS this way:

#dialog_client_id_close
{
...CSS attributes here....
}

Here you must replace dialog_client_id with the ClientID of the Dialog control. For example, if you have a Dialog with ID "Dialog1" inside a Panel with ID "Panel1", then the ClientID of the dialog may be Panel1_Dialog1. In that case the CSS selector you should use is #Panel1_Dialog1_close. This is based on the fact that the close button is an img element and its ID is always set to the Dialog's ClientID + "_close".

Hope this helps. Please feel free to let us know if you still have any question.

Thanks!
Ruperto Pasillas
Posted: Monday, January 8, 2018 1:40:55 PM
Rank: Newbie
Groups: Member

Joined: 12/27/2017
Posts: 3
Thanks! I was able to do this earlier before posting this question - it works for the most part - however, since the rendered appears to have the style="cursor: default" hard-coded, I can't apply a different cursor. Also, keying off of the name makes it less reusable.

This will work for now. Thanks!
eo_support
Posted: Monday, January 8, 2018 5:27:49 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,072
You are very welcome. Sorry there isn't a more elegant way!

Please feel free to let us know if there is anything else.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.