Rod
Rod

Reputation: 15423

ASP.Net Calendar Control styling background behind title

I'm trying to remove grey background behind calendar title but not having any luck. This is the default calendar control found in the toolbox. Can anyone see what I'm missing?

My best guess was:

#Calendar1 td
{
    background-color: transparent;
}

but didn't work. I can't seem to get a handle to that background color.

enter image description here

Upvotes: 0

Views: 1510

Answers (2)

HappyCoding
HappyCoding

Reputation: 661

Source: Calendar Class

Try setting the BorderWidth property to 0 and BackColor property to transparent.

ASP.NET Example

      <asp:Calendar id="calendar1" runat="server">
           <BorderWidth = "0">
           </BorderWidth>

           <TitleStyle BackColor = "Transparent">
           </TitleStyle>
      </asp:Calendar>

Upvotes: 1

Rahul
Rahul

Reputation: 77846

You need to use the TitleStyle-BackColor="Transparent" property like

<asp:Calendar ID="Calendar1" runat="server" TitleStyle-BackColor="Transparent">
</asp:Calendar>

Upvotes: 1

Related Questions