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.
Brandon,
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).
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
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.
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.
an urgent fix*
What have you tried?
I was going to try something like this when I get the chance:
dojo.create("button",{id: "btnOK",type: "button"},dojo.body()); var btnOK = new dijit.form.Button({ label: "OK", showLabel: true, style: "height: 20px;" }, "btnOK"); dojo.style("btnOK","width","40px");
Brandon