Hello,
I would like to make a few small css changes to some buttons on my splash pages.
var myButton1= new Button({ label: "I Accept", onClick: function(){ splashPage2.show(); splashPage1.hide(); domStyle.set(splashPage2.closeButtonNode, { display: 'none' });domStyle.set("myButton1", {fontSize:"5pt",letterSpacing:"1.2em"}); } }).placeAt(splashPage1.containerNode);
The part in bold does not change the style. Any suggestions to get the changes to work are appreciated. I stopped searching reference material online at the moment.
https://community.esri.com/groups/web-appbuilder-custom-themes?sr=search&searchId=2867be5a-d1d5-477d-b03f-d5337285cec7&searchIndex=0
https://community.esri.com/groups/web-app-builder-custom-widgets?sr=search&searchId=ec038c3c-7cc7-4a32-bf2c-4c36532fd3d1&searchIndex=2
That's what I thought after doing some research. I will get back to it later and repost. It isn't urgent of when it's fixed.
Brandon,
That is likely the case. So the better route is to add a class to the button and add a css rule to the widgets css/style.css file.
Oh yeah. Thanks. You are right. I still cannot get it to work:
var myButton1= new Button({ label: "I Accept", onClick: function(){ splashPage2.show(); splashPage1.hide(); domStyle.set(splashPage2.closeButtonNode, { display: 'none' }); domStyle.set(myButton1, "width", "100px"); } }).placeAt(splashPage1.containerNode);
it might need an id to be changed because maybe it will automatically override my script and just inherit the default dojo style
Remove the double quotes from myButton1 so that you are passing the button and not an id of the button like you have now (thought your button does not have that or any id).
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.