I have this piece of code:
<div dojoType="dijit.layout.ContentPane" style="width:200px;margin:0;padding:0;" doLayout="true"> <button dojoType="dijit.form.Button" style="width:100%;" doLayout="true"><span style="width:200px;"> </span></button></div>
I think it's clear what I'm trying to do. Do you know how I can make a button take 100% of the width of the container? Thanks.
Ok, I got a response on the IBM forum, someone told me to override the style of the DJ:
.dijitButtonNode {width: 100%; }
and it did the job :-)
if you need to change the width for a single instance, changing the CSS class would not be a good idea ... you can do it programmatically by applying a style to the domNode of your widget ... for example myButtom.domNode.style.width = "100%";
myButtom.domNode.style.width = "100%";
if you stick to the declaration, add a qualifier class:
<button data-dojo-type="dijit/form/Button" type="button" class="myButtons"></button>
then in css:
.myButtons .dijitButtonNode { width:100%; }
Source: https://habr.com/ru/post/893229/More articles:Adding jQuery - jqueryHow to create a popup for creating a new record in rails 3 - ruby-on-railsSetting width for Dojo button - javascriptSQL Server WITH clause - sqlusing CLLocation objects as keys in a dictionary - objective-cWhat can be lost in valgrind - valgrindEnabling and disabling components using the select flag - jsfJUnit independent tests with @Autowired springs - javasharepoint: add an existing site column to an existing content type. - c #C ++ default allocator - what should happen if the size is not equal to the size passed to the allocation call? - c ++All Articles