This is a migrated thread and some comments may be shown as answers.

External CSS

1 Answer 35 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 24 Jun 2014, 07:57 PM
Hi,

When I declare the input for a DropDownList using inline style the width is set accordingly:

<input id="Service" name="Service" style="width:900px"/>

When I use an external style sheet it does not:

#Service
{
    width: 600px;
}

Is there any way of using an external style sheet with Kendo UI? Please note that I do not want to use javascript to set the width.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 25 Jun 2014, 12:41 PM
Hello Jonathan,

The #Service element becomes hidden when the DropDownList widget is initialized, so the external width style has no effect.

The internal width style is copied to the widget wrapper, so it works. You can use a custom CSS class, which will be copied as well, so apply the custom width to the custom class, using appropriate CSS specificity to override the widget's default width style.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
DropDownList
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or