can codeigniter calendar be styled in 2 different colors?

时间:2015-05-12 22:45:37

标签: php css codeigniter

I need to style a codeigniter calendar using the template provided in the user guide but I need that from day 1 to 15 from a given month be background-color red and from day 16 to the last day of the month to be blue.

Please someone help me with this. I am very grateful for everyone's help.

1 个答案:

答案 0 :(得分:0)

您可以使用创建日历模板 这里: http://www.codeigniter.com/userguide2/libraries/calendar.html

或者你也可以使用 CSS3:nth-​​child()选择器

示例:

p:nth-child(2) {
    background: #ff0000;
}

在上面的示例中,为<p>

的第二个子parent:元素指定背景颜色