Support

Home Forums Event Espresso Premium Standardising column width in calendar

Standardising column width in calendar

Posted: October 22, 2015 at 3:38 am


tppadmin

October 22, 2015 at 3:38 am

Hi

If you scroll down to the bottom of this page http://bmc-client.co.uk/tppmain/course-intro/ I have put in a calendar. However for some reason the weekend is very wide. I have put in an event on a weekend but it seems to have pushed the column MUCH wider than the rest and skewed all the other columns and the top rows also aren’t right. Is there a way of standardising the columns? They all need to be the same width irrespective of whether there is an event or not.


Tony

  • Support Staff

October 22, 2015 at 5:34 am

Hi there,

This isn’t caused by the calendar itself, but you sites theme. Here is the code the theme is using:

.wpb_alert p:last-child, #content .wpb_alert p:last-child, .wpb_text_column p:last-child, .wpb_text_column *:last-child, #content .wpb_text_column p:last-child, #content .wpb_text_column *:last-child, .wpb_toggle_content p:last-child {
    margin-bottom: 0;
    width: 100%
}

If you take a look here: http://take.ms/tq6Jc

You can see the theme is applying styles to all ‘last-child’ elements using *:last-child

If I disable that within Chrome Dev Tools, you’ll notice the calendar spacing is correct: http://take.ms/o6eXH

That selector is very ‘loose’ and will likely target multiple elements you don’t actually want it to. To fix if for the Event Espresso calendar we can override it using something like:

#content #espresso_calendar *:last-child {
    width: auto;
}

However because the theme is using * selectors, you’ll notice the last child of the category legend and the last dropdown selector (above the calendar) are also 100% wide.

You can use:

#content #espresso_calendar *:last-child,
#content #espresso-category-legend *:last-child,
#content .ee-filter-form *:last-child {
    width: auto;
}

To target those at the same time.

I would recommend contacting the theme author and have them fix this, using * selectors in the way they are will cause these kinds of issues.


tppadmin

October 22, 2015 at 7:35 am

Brilliant thanks Tony – I’ve overidden this in my child theme css and made the width: auto that seems to work great now!


Tony

  • Support Staff

October 22, 2015 at 8:37 am

Your most welcome.

I’ll mark this thread resolved 🙂

The support post ‘Standardising column width in calendar’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso