Home › Forums › Calendar Products › Events Calendar PRO › CSS to color tribe-events-button works on one page but not on another
- This topic has 14 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
July 29, 2013 at 6:09 pm #57684
Cynthia Lockley
ParticipantI have CSS that colors the iCal button on the tribe_show_month view (see http://events.stcwdc.org/) but it doesn’t work for the +Google Calendar +iCal Import buttons on the event description page (see below the author box on http://events.stcwdc.org/event/stc-wdcb-summer-vision-day-meeting/) See snippit for the CSS at http://snippi.com/s/rc8ivm0
Why doesn’t it work on both pages?
Why is there only an iCal button on the first page?July 30, 2013 at 7:03 am #57742snorton
ParticipantThis is due to specificity. Look at your body classes on either page and see that on the actual event description page you have tribe classes on the body. So, the way that ECP applies styles will override yours because it is more specific. You will want to rewrite your CSS to target the tribe-events-ical and tribe-events-gcal classes more specifically.
July 30, 2013 at 7:46 am #57752Cynthia Lockley
ParticipantThese are both uncustomized Events Calendar files and they both use class=”tribe-events-ical tribe-events-button” for the iCal button so I don’t understand why they aren’t both using the CSS style in themes/mytheme/tribe-events/tribe-events.css. The Tribe classes are supposed to be overridden by the tribe-events.css
July 30, 2013 at 8:02 am #57757snorton
ParticipantI agree with you, the Tribe classes are supposed to be overridden, but the styles that are applied on the second are more specific than your code.
For your css, try below (adds .single-tribe_events class selector for your declaration. A higher level of specificity overrides more general selectors. You can add !important to your property value to see your style applied regardless of specificity, but it is often times bad practice to leave important in your css. So tribe-events.css WILL override the other tribe styles that have equal or lesser specificity):
/* ~~~~~~~~ Added color focus, visited, and hover actions to ical button ~~~~~~~~ */
a.tribe-events-ical, a.tribe-events-gcal, .single-tribe_events a.tribe-events-ical, .single-tribe_events a.tribe-events-gcal {
color: #fff;
background-color: #5f9ea0; // green
}.tribe-events-calendar td.tribe-events-present div[id*=”tribe-events-daynum-“], .tribe-events-calendar td.tribe-events-present div[id*=”tribe-events-daynum-“] > a, #tribe_events_filters_wrapper input[type=”submit”], .tribe-events-button, .tribe-events-button.tribe-inactive, .tribe-events-button:hover, .tribe-events-button.tribe-active:hover, .single-tribe_events .tribe-events-calendar td.tribe-events-present div[id*=”tribe-events-daynum-“], .single-tribe_events .tribe-events-calendar td.tribe-events-present div[id*=”tribe-events-daynum-“] > a, #tribe_events_filters_wrapper input[type=”submit”], .single-tribe_events .tribe-events-button, .single-tribe_events .tribe-events-button.tribe-inactive, .single-tribe_events .tribe-events-button:hover, .single-tribe_events .tribe-events-button.tribe-active:hover {
color: #fff;
/* background-color: #21759b; // turquoise blue */
background-color: #005ea1; // blue
}July 30, 2013 at 8:12 am #57758Cynthia Lockley
ParticipantThanks. That is better than what I was going to try to do. I’ll give it a whirl.
July 30, 2013 at 8:15 am #57759snorton
ParticipantBy the way, did you know there are two comment boxes on your event details page? I noticed that when I visited your link earlier. 🙂
July 30, 2013 at 8:20 am #57762Cynthia Lockley
ParticipantIt is mostly working. Gotta figure out why the green buttons on the event description page don’t have the white font color like the first page does.
July 30, 2013 at 8:24 am #57766Cynthia Lockley
ParticipantOoo–even more interesting. I clicked on the Google button by accident and got (I’m in the Firefox browser):
Google
414. That’s an error.
The requested URL /… is too large to process. That’s all we know.I’ll start a new thread about that one!
July 30, 2013 at 8:25 am #57767snorton
ParticipantSame principle here, regarding specificity and overrides. In your case with this, you’ve got a declaration under the comment on your stylesheet that says /* Tribe Theme Color */ which re-declares the link color
July 30, 2013 at 8:44 am #57770Cynthia Lockley
ParticipantI tried adding .tribe-events-button to the a links for green that took out the green. I tried adding the buttons’ div class tribe-events-cal-links but that also took out the green.
July 30, 2013 at 9:02 am #57778Cynthia Lockley
ParticipantYes, I know I have two comment boxes. I have another thread for that and Neil is trying to figure it out. I noticed that someone else in a different thread also has two comment boxes. Perhaps others do also–they just don’t scroll down far enough.
July 30, 2013 at 9:12 am #57780Cynthia Lockley
ParticipantGot the white font to work by moving the Tribe theme CSS above it.
July 30, 2013 at 9:13 am #57781Cynthia Lockley
ParticipantThis can be closed now. Very complicated CSS!
August 1, 2013 at 3:40 pm #58408Rob
MemberMajor thanks for the assist here, snorton.
Cynthia: thanks for bearing with us. The complicated CSS has been an overwhelming bit of feedback we’ve received from the community since launching, and we’re looking at ways to rectify that now 🙂 Thanks for being vocal about it and stay tuned as we announce our findings on that end.
Closing this thread for now, but if anyone needs anything else, let me know.
July 7, 2015 at 6:27 am #979740Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘CSS to color tribe-events-button works on one page but not on another’ is closed to new replies.
