ColorPickerExtender - Managing padding problems

时间:2016-04-25 08:52:24

标签: asp.net padding ajaxcontroltoolkit

I have some problems with AjaxControlToolkit's ColorPickerExtender while using the latest version of ASP.net. (After doing a little digging in Development Tools on Chrome, I found out that it's the padding.)

Whenever I try to use this colorpicker, it shows this: 8px padding but what I really want it to look like is this: 0px padding

I think the bootstrap css is automatically being applied to the padding of the colorpicker table, which is automatically generated.

My question is, how do I make sure that it keeps 0px padding?

Here's where I use it in the aspx file.

<EditItemTemplate>
  <tr style="">
    <td>
      <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
      <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
    </td>
    <td>
      <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
    </td>
    <td>
      <asp:TextBox ID="ColorTextBoxEdit" runat="server" Text='<%# Bind("Color") %>' MaxLength="6" Columns="6" />
      <asp:ImageButton ID="ImageButton_ColorPicker" runat="server" ImageUrl="../Images/icon_colorpicker.png" />
      <ajaxToolkit:ColorPickerExtender ID="ColorPickerExtender1" runat="server" TargetControlID="ColorTextBoxEdit" SampleControlID="ImageButton_ColorPicker" PopupButtonID="ImageButton_ColorPicker" />
    </td>
    </tr>
</EditItemTemplate>

1 个答案:

答案 0 :(得分:1)

如果您知道ColorPicker的ID,则可以设置特定于此控件的CSS规则,该规则将覆盖默认的ColorPicker规则。