Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
630
WebDatePicker does not use the width attribute
posted

I have a <div> container set up as follows:

 

 

 

 

 

 

 

 

 

 

 

 

<

 

div class="Logs_Filter_Date_Container" style="width: 15%;">

<div class="Logs_Filter_Date_Text" style="width: 40%;">

 

 

<span><asp:Literal ID="lblStartDate" runat="server"></asp:Literal></span></div>

 

 

<div class="Logs_Filter_Date_Combo_Container" style="width: 58%;">

 

 

<ig:WebDatePicker ID="clndrStartDate" DropDownCalendarID="StartDate_WebMonthCalendar"

 

 

runat="server" Width="100%"><ClientSideEvents KeyDown="NotificationLog_calendarKeyDown" TextChanged="NotificationLog_filterChanged" />

 

 

</ig:WebDatePicker>

 

 

<ig:WebMonthCalendar ID="StartDate_WebMonthCalendar" runat="server"></ig:WebMonthCalendar></div></div>

Note the width setting on the clndrStartDate = 100%. I would expect that the control would 100% of its containing <div> which was set to 58%. However upon inspecting the control using both firebug for firefox and developertools for IE, the <table> that contains the WebDatePicker is set to 100px via an inline setting. To work around this problem I used the Logs_Filter_Date_Container CSS class to get to the table (which is essentially the WebDatePicker) and override  its width as 100%:

 

.Logs_Filter_Date_Combo_Container

 

> table

{

 

 

width:100% !important;

}

My question is why the  width attribute of the WebDatePicker is ignored and set to 100px inline?