Have you ever noticed how plain, ugly, and more over difficult it is to use the Sharepoint Calendar Webpart?? I've come to find out over the last few months of designing and implementing my company's changes that I usually have 3 options.
.ms-acal-summary-dayrow th { display:none; } .ms-acal-month tr th:first-child { display: none; } .ms-acal-header { text-align:center; } .ms-acal-outday{ display: none; } .ms-acal-month td { text-align:center; } .ms-acal-summary-dayrow td div { color: #696158; } .ms-acal-summary-itemrow > td { display:none !important; } .ms-acal-summary-dayrow td div { background-color:#F2F1E7; border: 1px solid #F2F1E7; } .ms-acal-ctrlitem { display:none; } .ms-acal-header { width:300px; margin: 5px 10px; } .ms-acal-rootdiv { font-size:14px; color:#696158 !important; } .ms-acal-display { color:#696158; font-size:16px; } .ms-acal-month-top { color: #696158; } .ms-acal-rootdiv tr:first-child{ font-size:10px; } .ms-acal-summary-dayrow > div{ height:30px; } #AsynchronousViewDefault_CalendarView table:first-child td { padding: 1px; } .ms-acal-week-top td.ms-acal-hover div, .ms-acal-summary-dayrow td.ms-acal-hover div, .ms-acal-summary-dayrow th.ms-acal-hover, tr td div.ms-acal-today{ background-color: #a43a34; border-color: #a43a34 !important; text-decoration: none; color:white !important; }
Close 8am 9am 10am 11am 12pm 1pm 2pm 3pm 4pm 5pm
Each td is assigned a class (yes I know this wasn't necessary, but easier for readability purposes. The first row in the table is used for the calendar date. Each "leftTD" is used for the timeframe, and "middleTD" is used for displaying our calendar events.
Below is our CSS for the table above.
.calendarDisplayCSS { position:absolute; width:800px; height:1000px; } #calendarDisplay { position:absolute; height:630px; top:50px; left:600px; width: 470px; background-color:white; border: 1px solid #666; border-bottom:none; overflow-y: scroll; } #cal-holder { border-collapse: collapse; } #cal-holder .leftTD { width:40px; text-align:right; font-size:14px !important; border-right: 1px solid #666; } #cal-holder .middleTD { width: 630px; } #cal-holder td { height:30px; font-size:12px; background: #ffffff; /* Old browsers */ background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 79%, #ededed 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(79%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 79%,#ededed 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 79%,#ededed 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 79%,#ededed 100%); /* IE10+ */ background: linear-gradient(top, #ffffff 0%,#f6f6f6 79%,#ededed 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */ } #cal-holder tr:nth-child(odd) td { border-bottom: 1px solid #666; } #cal-holder tr:nth-child(even) td { border-bottom: 2px dotted #666; } #cal-holder .blue { margin:1px; display:inline-block; background: rgb(99,182,219); /* Old browsers */ background: -moz-linear-gradient(top, rgba(99,182,219,1) 0%, rgba(48,157,207,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(99,182,219,1)), color-stop(100%,rgba(48,157,207,1))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, rgba(99,182,219,1) 0%,rgba(48,157,207,1) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(99,182,219,1) 0%,rgba(48,157,207,1) 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, rgba(99,182,219,1) 0%,rgba(48,157,207,1) 100%); /* IE10+ */ background: linear-gradient(top, rgba(99,182,219,1) 0%,rgba(48,157,207,1) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#63b6db', endColorstr='#309dcf',GradientType=0 ); /* IE6-9 */ } .blue div { padding:5px; font-size:12px; color:white; }
The CSS above is self-explanitory. One thing to note here is the Line 57 - if you do not want your divs to span all the way across the calendar, meaning the divs dynamically created are only as wide as the text that is contained, then remove this line. For positioning on your page, depending on where your calendar is located, adjust lines 10-11.
Jump To Part 2
Anything in here will be replaced on browsers that support the canvas element