|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
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.aspxBecause 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!
|
|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
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!
|
|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
You are very welcome. Sorry there isn't a more elegant way!
Please feel free to let us know if there is anything else.
|
|