This may be a common problem, but I'm struggling to find a solution that will fix it.
I have a modal popup displayed using jQuery, this popup contains a list of checkboxes and a button, the code looks like this:
<div id="dialog" title="Notify Users" > <div style="width:100%; height:500px; overflow:auto;"> <asp:CheckBoxList ID="chkNotify" runat="server" CssClass="checkboxlist_nowrap" RepeatLayout="Table" /> </div> <asp:Button ID="btnSaveNotifications" runat="server" Text="Ok" /> </div>
The popup window displays correctly, however, the labels for each flag are in the line below this flag. I canβt understand why this is happening, at first I suggested that the div containing the CheckBoxList was just too small, so I gave each div fixed width, but that didn't help anything.
I also tried applying this CSS
.checkboxlist_nowrap tr td label { white-space:nowrap; overflow:hidden; width:100%; }
This did not help, but I do not know if the stylesheet was actually used, although I have:
<link href="../css/HelpDesk.css" rel="stylesheet" type="text/css" />
in my tags.
Can anyone suggest anything else that I can try?
thanks
UPDATE: Here is my jQuery:
$(function () { $("#dialog").dialog({ autoOpen: false, show: "blind", width: 400, hide: "explode" });
And this is how I populate the CheckBoxList :
Private Sub populateCheckBoxList() Dim notificationList As DataTable notificationList = dbGetNotificationsList(1) For Each dr As DataRow In notificationList.Rows Dim li As New ListItem li.Text = dr("FullName") li.Value = dr("ID") If (dr("Checked") = 1) Then li.Selected = True Else li.Selected = False End If chkNotify.Items.Add(li) Next End Sub
I tried moving the CheckBoxList only inside the form tag so that other styles would not be applied and nothing would affect it, but I still get the same problem.