I have followed this tutorial: http://www.phpjabbers.com/how-to-make-a-php-calendar-php26-6.html#comments to make a very basic calendar. My aim is to create a very basic availability calendar whereby booked days are filled in with a different color. I have managed to accomplish this however I would like to be able to indicate mornings and afternoons by filling only half of a squares background color like the following:
http://www.phpjabbers.com/availability-calendar/
Does anyone know how I could accomplish this?
This is more in the domain of html/css than php. One way to accomplish what you’re looking for is to simply specify css classes that style the calender days according to their respective booked statuses.
I politely decline to look at your supplied tutorial, so I’ll assume you’re using table
<td>cells to display the calendar days. One way to accomplish your goal would be to create two images and use them as the backgrounds for cells that have the matching class:The same concepts apply if you were using, say,
<div>elements to hold the calendar days.You would simply use PHP to tag each calendar cell with the appropriate style.