Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #857502

    Hello

    Recently I deployed another website using Enfold (Based on Enfold Medical demo) and I have been trying to integrate The Events Calendar notifications into the front page.

    I’ve put both Upcoming events and Events countdown widgets into a color section in order to separate it from other content (image 01). However, when the event has passed or there are no scheduled events, there is a empty thick blue strip (image 02). I’ve tried to hide the color section using :empty css selector and looked through the Support forum but the solutions I found didn’t work. My desired look is to display nothing in case no event is scheduled (image 03).

    Since this is a live website, I pulled the entire color section with the Events Calendar widgets so unfortunately I can only provide pictures.

    I have some other questions about styling, but I will open separate threads for them.

    Thank you for any assistance

    #857564

    Hey milanissimo85,

    This would have to be handled via JavaScript if/else logic which goes beyond the scope of support here in the forums. We do offer freelance services which would be able to help you http://kriesi.at/contact/customization

    Best regards,
    Jordan Shannon

    #857615

    Hello Jordan

    Thanks for quick reply. I have a follow up question then. Is it possible to reduce the height of empty color section to around 5px via CSS? The best I could do was to set padding to “small” as is shown on Image 02 and it’s too tall. If it was around 5px, I would keep it as a separator between the slider and main content.

    Thank you

    #857736

    Hi,

    Will the color section always be empty? If so you can target this class (you can user browser inspector to get it) and simply use css to adjust the height. If you have a link to the site/page/section in question I can give you the appropriate class and css to do so.

    Best regards,
    Jordan Shannon

    #857894

    Hi Jordan

    No, the section won’t be always empty. If there is an event scheduled, there will be a timer and the icon, just like it’s shown on image 01. Otherwise I’d like to keep it around 5-10px max so it doesn’t draw as much attention. If it’s too complicated, I might set it the same height as the menu above the slider and leave it like that.

    #857934

    Hi milanissimo85,

    It’s very hard to provide you with any solutions without seeing the actual html.
    Would be much easier if you could give us a link to the website with the element in question.

    Best regards,
    Victoria

    #857938

    Hello Victoria

    I have recreated the element (currently without The Events Calendar shortcodes) and named it “evcal”. It’s right under the slider on the front page I provided in private content.

    #858006

    Hi,

    Best regards,
    Victoria

    #858362

    Hello Victoria, I’d like it to be around 5px, but if it would be too complicated, I can live with the current height.

    #858561

    Hi,

    Yes, apologies, but that would require additional JS scripting to produce and unfortunately that goes beyond the scope of support here in the forums. Essentially you need an if/else statement to be written.

    Best regards,
    Jordan Shannon

    #859149

    Thank you Jordan, I will leave it as is for now. You can close the thread.

    #859207

    Hi,

    Thanks for the feedback. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Hide color section if empty’ is closed to new replies.