Title: [Plugin: Event Calendar 3 for PHP 5.3] CSS Validation Errors &#8211; Suggestions For &quot;Patch&quot;
Last modified: August 19, 2016

---

# [Plugin: Event Calendar 3 for PHP 5.3] CSS Validation Errors – Suggestions For "Patch"

 *  [tarfis](https://wordpress.org/support/users/tarfis/)
 * (@tarfis)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-event-calendar-3-for-php-53-css-validation-errors-suggestions-for-patch/)
 * Hi!
 * I’m not sure how to get in touch with the developer(s) easiest, so I’m trying
   via forum and via mailinglist.
 * **Summary**
    I tried to validate CSS at a site I’m working on, and I stumbled
   across two files with invalid CSS. In **ec3.css** some semicolons had to be added,
   and in **eventcalendar3.php** I added conditional HTML-tags for Internet Explorer
   and some “style”-HTML-tags. (I am aware that the latter has been corrected in
   Event Calendar 3.2 – but here, in Version 3.1.5 for PHP 5.3 it’s still present.)
 * **### The ec3.css**
    The following is the entire(!) code of the corrected ec3.
   css.
 * The opacity-selectors still don’t validate, but I see no way to work around that,
   if you seriously want opacity.
    One possible workaround would be setting a .png
   with alpha-transparency as background-image, which would render intransparent
   in Internet Explorer 6 (“and below” 😉 ). For designers who need to create opacity-
   like-effects also for IE6 and below and who at the same time need to create code
   that’s classified valid via the W3C’s validation service could use conditional
   tags for IE in their HTML (head section) to link to a specific IE6-css where 
   they can put the opacity-settings. Other browsers would ignore the conditional
   tags. (See also notes below for the eventcalendar3.php-file.)
 *     ```
       /* EventCalendar. Copyright (C) 2005 2006/2011, Alex Tingle/tarfis.  $Revision: 264 $
        * This file is licensed under the GNU GPL. See LICENSE file for details.
        */
   
       /***
        ***  Calendar
        ***/
   
       #wp-calendar table {
        width:100%;
       }
   
       #wp-calendar #prev {
         text-align:left;
       }
   
       #wp-calendar #next {
         text-align:right;
       }
   
       .ec3_eventday a {
        color:#a00!important;
       }
   
       #wp-calendar table td,
       #wp-calendar table th {
         text-align:center;
       }
   
       #wp-calendar table td,
       #wp-calendar table td.pad:hover,
       #wp-calendar table.nav tr td {
        padding:1px;
        border:none;
       }
   
       #wp-calendar table td:hover,
       #wp-calendar table #today {
        padding:0px;
        border:solid 1px #999;
       }
   
       /* The EC graphic. */
   
       .ec3_ec {
        display:block;
        float:right;
        border:none;
        width:13px;
        height:9px;
       }
   
       .ec3_ec span {
        display:none;
       }
   
       /***
        ***  Popup
        ***/
   
       .ec3_popup {
        margin:0!important;
        padding:0!important;
        border:none;
        position:absolute;
        border-collapse:collapse;
        filter:alpha(opacity=87);
        -moz-opacity:.87;
        opacity:.87;
        z-index:30000;
       }
   
       .ec3_popup td {
        padding:0;
       }
   
       .ec3_popup table {
        border:solid #999 1px;        /* popup border */
        background-color:#eeb;        /* popup background colour */
        font-size:x-small;            /* popup font size */
        color:black;
        text-align:left;
       }
   
       .ec3_popup table td {
        padding:1.5px 3px 1.5px 3px;
       }
   
       #ec3_shadow0 div {
        width:8px;
        height:32px;
       }
   
       #ec3_shadow0 {
        margin:0;
        padding:0;
        border:none;
        width:8px;
        background-repeat:no-repeat;
        background-position:bottom right;
        vertical-align:bottom;
       }
   
       #ec3_shadow1 {
        margin:0;
        padding:0;
        border:none;
        height:16px;
        background-repeat:repeat-x;
       }
   
       #ec3_shadow2 div {
        width:8px;
        height:32px;
       }
   
       #ec3_shadow2 {
        margin:0;
        padding:0;
        border:none;
        width:8px;
        background-repeat:no-repeat;
        background-position:bottom left;
        vertical-align:bottom;
       }
   
       /***
        ***  Event list
        ***/
   
       .ec3_list {
        margin-left:-12px;
        word-spacing:-1px;
        letter-spacing:-0.2px;
        color:#800;
       }
   
       .ec3_list li {
        font-size:1em!important;
       }
   
       .ec3_list li:before {
        content:""!important;
       }
   
       /***
        ***  Schedule
        ***/
   
       table.ec3_schedule {
        border-collapse:collapse;
        margin:0.5ex 1ex 0.5ex 0;
        border:solid 1px #800;
        float:left;
       }
   
       table.ec3_schedule td {
        padding:0 0.5ex 0 0.5ex;
        color:#800;
       }
   
       td.ec3_start {
        text-align:right;
       }
   
       td.ec3_to {
        text-align:center;
       }
       ```
   
 * **### The eventcalendar3.php**
    As mentioned above, I am aware that this issue
   has been tackled in EC 3.2, which does not yet exist for PHP 5.3 The code-snippet
   below is to substitute **lines 185 to 239 in version “EC 3.1.5 for PHP 5.3”**.
 *     ```
       .ec3_ec {
        background-image:url(<?php echo $ec3->myfiles; ?>/ec.png) !IMPORTANT;
        background-image:none;
       }
       </style>
   
       <!--[ifIE]>
       <style type='text/css' media='screen'>
       .ec3_ec {
        filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $ec3->myfiles; ?>/ec.png');
       }
       </style>
       <![endif]-->
   
       <?php   if(!$ec3->disable_popups): ?>
   
       <style type='text/css' media='screen'>
       #ec3_shadow0 {
        background-image:url(<?php echo $ec3->myfiles; ?>/shadow0.png) !IMPORTANT;
        background-image:none;
       }
   
       #ec3_shadow1 {
        background-image:url(<?php echo $ec3->myfiles; ?>/shadow1.png) !IMPORTANT;
        background-image:none;
       }
   
       #ec3_shadow2 {
        background-image:url(<?php echo $ec3->myfiles; ?>/shadow2.png) !IMPORTANT;
        background-image:none;
       }
       </style>
   
       <!--[ifIE]>
       <style type='text/css' media='screen'>
       #ec3_shadow0 div {
        filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $ec3->myfiles; ?>/shadow0.png',sizingMethod='scale');
       }
       #ec3_shadow1 {
        filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $ec3->myfiles; ?>/shadow1.png',sizingMethod='crop');
       }
       #ec3_shadow2 div {
        filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $ec3->myfiles; ?>/shadow2.png',sizingMethod='scale');
       }
       </style>
       <![endif]-->
   
       <?php   endif; ?>
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Marventus](https://wordpress.org/support/users/marventus/)
 * (@marventus)
 * [15 years ago](https://wordpress.org/support/topic/plugin-event-calendar-3-for-php-53-css-validation-errors-suggestions-for-patch/#post-2024825)
 * Hi tarfis,
 * Thanks a lot for sharing your solution with all of us. This validation affair
   was driving me nuts! I was doing it with php if statements and the W3C wasn’t
   liking too much, hahaha.
    Take care,
 * Marv
 *  Thread Starter [tarfis](https://wordpress.org/support/users/tarfis/)
 * (@tarfis)
 * [15 years ago](https://wordpress.org/support/topic/plugin-event-calendar-3-for-php-53-css-validation-errors-suggestions-for-patch/#post-2024826)
 * by the way, until the developer includes my “patch” you can also use
    `<?php 
   global $ec3; $ec3->nocss=true; ?>` in the `<head></head>` section in your wordpress
   template files.
 * just insert the line right before the one saying
    `<?php wp_head() // For plugins?
   >`
 * this will prevent wordpress from loading the ec3-css. if you want to customize
   the style anyway to make it fit better in your page layout and design, this might
   be the best solution anyway.
 * this will also make the “popups” disappear. e. g. you can copy and customize 
   the original ec3-css into your style.css-file.
 * hope this tip also helps!
 *  Anonymous User 6592746
 * (@anonymized-6592746)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-event-calendar-3-for-php-53-css-validation-errors-suggestions-for-patch/#post-2024854)
 * Thanks for the nocss tip, tarfis. That was driving me batty for years. 😀
 *  [Jamie S](https://wordpress.org/support/users/spacedragon/)
 * (@spacedragon)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-event-calendar-3-for-php-53-css-validation-errors-suggestions-for-patch/#post-2024855)
 * Thanks for the nocss tip, tarfis. That was driving me batty for years. 😀

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Event Calendar 3 for PHP 5.3] CSS Validation Errors – Suggestions
For "Patch"’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/event-calendar-3-for-php-53.svg)
 * [Event Calendar 3 for PHP 5.3](https://wordpress.org/plugins/event-calendar-3-for-php-53/)
 * [Support Threads](https://wordpress.org/support/plugin/event-calendar-3-for-php-53/)
 * [Active Topics](https://wordpress.org/support/plugin/event-calendar-3-for-php-53/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/event-calendar-3-for-php-53/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/event-calendar-3-for-php-53/reviews/)

## Tags

 * [ec3](https://wordpress.org/support/topic-tag/ec3/)
 * [Event Calendar 3](https://wordpress.org/support/topic-tag/event-calendar-3/)

 * 4 replies
 * 4 participants
 * Last reply from: [Jamie S](https://wordpress.org/support/users/spacedragon/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-event-calendar-3-for-php-53-css-validation-errors-suggestions-for-patch/#post-2024855)
 * Status: not resolved