Thursday, July 4, 2002
Day 19: Using real table headers
Mark PilgrimIf you have a calendar on your weblog, it should be rendered as an HTML table. There have been a few attempts to create pure-CSS calendars. This is misguided; calendars are data tables, and should be marked up as such.
Find "addDayName" in system.verbs.builtins.radio.weblog.drawCalendar. Change the code to read as follows:
on addDayName (name, fullname)
add ("<th abbr=\"" + fullname + "\" width=\"19\" height=\"10\" align=\"center\" style=\"font-size:9px\">" + name + "</th>")
Next, change the line just below the "for i = 1 to 7" line so that it reads as follows:
addDayName (radio.string.getLocalizedString ("dayOfWeekShort." + i), radio.string.getLocalizedString ("dayOfWeek." + i))