|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)
Is there a quick and easy way to change the color of the table cells that are before the beginning of the month and after the end of the month?
Thanks. |
|
#2
|
|||||
|
|||||
|
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)
Indeed there is. I did exactly this for our calendar.
Search through the PHP files for the text <!--empty Cell -->. Immediately below this text you will find a <td> tag. Change this tag and add class=calempty to it. For example, this is a copy and paste from my calendar.... change the line to... php Code:
NOTE: I have removed the slashes for clarity. You will need to escape the quotes marks accordingly In your CSS file you now need to add the calempty class definition. Again, here is a copy and paste from my CSS... Code:
td.calempty {
background-color: #ddd;
text-align: left;
vertical-align: top;
}
Hope this helps. |
|
#3
|
|||
|
|||
|
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)
Sorry, made a bit of a **** up on the previous post. I tried to make the changes to new code using the bold tags, unfortunately, they printed out in the code and didn't actually make the text bold, so ignore the [code][code] in the text. I would have edited the posting, but I don't seem to be able to.
|
|
#4
|
|||
|
|||
|
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)
q
|
|
#5
|
|||
|
|||
|
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)
Leigh,
Thanks very much for your kind assistance. As an alternative, I was able to create cells that match the table background color by using the "empty cells" CSS syntax. Your code is much more flexible, however, and I will take advantage of it when I need a color change. Thanks! |
|
#6
|
|||
|
|||
|
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)
I followed the instructions above and added the slashes for the quotes and was able to change the color of the empty cells. The problem is the actual calendar changed. The blank cells moved to the opposite side of the calendar (both before and end blanks). I could not see why the structure of the calendar changed and reverted back to the previous ltwdisplaymonth.php
Please advise what caused the shift. Thanks JStevenT |
|
#7
|
|||||
|
|||||
|
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)
John,
Are you sure you correctly escaped all the quotes marks? It sounds like something went awry. Below it the code I use copy & pasted directly from our live calendar, complete with slashes... php Code:
Copy and paste that into your ltwdisplaymonth.php file and give it a try. It occurs at line 267 approx. |
|
#8
|
|||
|
|||
|
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)
Hello Leigh,
I pasted the php code as shown and it corrected the problem. I believe I might have missed the slash after the final % sign. Thanks again to Leigh. Code:
echo "<!--empty Cell --> <td class="calempty" width="14%" height="" . (100 / $num_of_rows) . "%">"; JStevenT |
![]() |
| Viewing: Codewalkers Forums > Projects > ltwCalendar > How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|