locked
CSS Class Issues with Calendar server control RRS feed

  • Question

  • User766188285 posted
    We're having some difficulties getting CSS styles from a style sheet to get correctly applied to an ASP.NET Calendar server control. The styles for individual days get applied to the associated table cells, but the Calendar control seems to be inserting some hard-coded "color:black" styles into the anchors it generates inside those table cells, which then take precedence over what was applied at the table cell level. Because of this, no matter what we do in the style sheet, we cannot change the style of the text for individual days. We can circumvent this by manually setting style characteristics directly on the TableItemStyle, but because we're shipping this inside commercial software we'd prefer our customers be able to tailor the UI through the style sheet. The behavior seemed to improve between 1.0 and 1.1. At 1.0 there were many places where the CSS style wasn't being applied. At 1.1 they're being applied in most cases, but the hard-coded styles being generated by the Calendar are overriding them. I have to believe it would be a trivial fix to change the places where the control developer hard-coded (style="color:black"). Thanks ahead of time for any suggestions. Jim
    Tuesday, February 4, 2003 10:09 AM

All replies

  • User1806792307 posted
    If you are interested, I offer a replacement to Microsoft's web Calendar that is pretty fancy and has numerous style sheet properties (all with default names already referring to a supplied file which makes it easy to change the look simply by editing the file.) Learn about it at: www.PeterBlum.com/DateControls/Home.aspx
    Thursday, February 6, 2003 7:25 PM
  • User-2126029614 posted
    I too have had problems getting CssClass to work properly with all elements of the calendar control. Sadly, this message is not a ray of hope or answer to your question. More like reiteration of the problem (It's not just your configuration.). Have you had any luck getting the TitleStyle to accept any CssClass sytling at all? At least with all of the other properties the CSS is applied almost entirely (the link text color being one of the problems). The title won't even take background colors, padding or anything. I have had to hard apply my styling here until I come up with a solution which leaves our theme settings not quite global.
    Friday, February 7, 2003 8:21 AM
  • User-1769785422 posted
    You may want to take a look here[1] [1] http://weblogs.asp.net/vga/archive/2004/02/01/CalendarsBuggyStyleHandling.aspx
    Saturday, January 31, 2004 11:39 PM