Problem with CSS interitance.
I am having a problem with CSS interitance. I am adding a calendar to an already existing web page. In my already existing CSS file (not the one specific to calendar) I have
Code:
td {
text-align: left;
padding: 3px;
}
because most of my table data is aligned to the left. When data generated by calendar (such as navigation characters, or days in the calendar) is displayed within the calendar, all td's are left-justified when they are supposed to be center or right-justified. As a example, here is the HTML for the navigation characters below the calendar:
Code:
</table>
</td></tr></table><table width="580px" border="0" cellspacing="0" cellpadding="0"> <tr>
<td align=left width="33%"><a href="index_cal.php?mo=9&yr=2009" class=navTableText><<</a></td>
<td align=center width="34%"><a href="index_cal.php?mo=12&yr=2009" class=navTableText>-=-</a></td>
<td align=right width="33%"><a href="index_cal.php?mo=3&yr=2010" class=navTableText>>></a></td>
</tr>
</table>
Although the second <td> is listed as "align=center", the <td> is actually aligned to the left (inherited from the main CSS file). I have verified this using firebug in firefox (version 3.5.5) and the same results are shown using Internet Explorer. It seems CSS overrides the older align directive. I know I can rewrite my entire web page and change the blanket CSS directives to one specific to each <td> on my current page using ID's or classes, but I prefer not to do that as I have several other web sites where I want to use the calendar.
Any suggestions as to how I can solve this problem?
Great product BTW.
Thanks,
Steve
|