Home › Forums › Calendar Products › Events Calendar PRO › Photo View Column Width
- This topic has 5 replies, 4 voices, and was last updated 9 years, 1 month ago by
Stuart.
-
AuthorPosts
-
February 24, 2017 at 10:18 am #1245379
Stuart
ParticipantIs there a way to change the width of the column, based on the number of events showing?
For example, the default 3 column layout works perfectly, except when I have only 1 or 2 upcoming events. In these instances, I wonder if there is a function that can count the number of events and add a class that overrides the default 32% width? I can add a class to ALL the #tribe-events-photo-events .type-tribe_events.tribe-events-photo-event instances, but don’t know how to apply a counter via jQuery, for example.
Or maybe you have a simpler way!
February 25, 2017 at 12:54 am #1245692Geoff B.
MemberGood evening Stuart and welcome back!
Thank you for reaching out to us.
I would love to help you with this topic.Your idea of adding a CSS class is really good.
What you could then do is have CSS rules that use the !important and are very specific.
Basically, the goal is to make sure that if that CSS class exists, your CSS has priority.As a side note, you might want to look into the following great example of how somebody customized the photo view: https://theeventscalendar.com/knowledgebase/change-photo-view-to-equal-height-grid/
Have a good weekend,
Geoff B.
February 25, 2017 at 1:50 am #1245717Stuart
ParticipantThanks Geoff, that’s exactly what I planned to do. I’m hoping you know and can advise on how to count whether the photo view is showing 1 or 2 events with jQuery. The idea would then be to apply the css class accordingly.
February 27, 2017 at 9:51 pm #1246687Geoff B.
MemberGood evening Stuart,
Thank you for writing back.
Just to set expectations, the scope of our support is mostly to get our customers started on the right track and to help them in case of issues.
To clarify, we are excited about our customers customizing our plugins to their needs.
But, we unfortunately do not provide complete support for customization.With that in mind, my favorite source of inspiration for that stuff is stackoverflow: http://stackoverflow.com/questions/1021306/using-jquery-to-limit-the-number-of-list-elements
If coding is not your thing, you could hire one of our recommended customizers to do the customization for you.
Let me know how that goes.
Best regards,
Geoff B.March 21, 2017 at 9:35 am #1257427Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Photo View Column Width’ is closed to new replies.
