1

I'm working on dojo 1.6 and I use a dijit.form.Select widget. The problem I'm facing now is when I select a long text from the dropdown, it goes beyond the width of the widget. I want the string to be enclosed in the width allotted to the widget. I tried using the overflow: hidden attribute but it is not working. Please help. Here is the code segment which I'm working on.

        this.dapNAME = new dijit.form.Select({

            name            : "NAME",
            placeHolder     : 'Enter Name',
            maxHeight       : -1,
            style           : {width: '265px'}
        }, this.dapNAME);
1
  • Check this link, which should help you in solving you issue
    – frank
    Commented May 8, 2015 at 14:35

1 Answer 1

0

I have taken the answer from this link

There is another link which might help too.

you need to style your css. Remember to replace the tundra style with whatever style ( claro, nihilo, etc..) you have chosen for your site.

.tundra .dijitSelect .dijitButtonText {
    text-align: left;
}

.tundra .dijitSelectLabel {
    width: 120px;
    overflow: hidden;
}
2
  • This is not what he/she wants as I understand. Your answer does not change the width of the select options.
    – dbd
    Commented May 8, 2015 at 14:49
  • @dbd Can you explain your comments please?. I think the user wants that the text when selected and displayed should not go beyond the allotted width of the widget.
    – frank
    Commented May 8, 2015 at 16:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.