NO BUG: Carousel inside component does not work properly

Browser: Firefox
OS: windows
URL: Link to a page that illustrates this issue
How it should look: Die schönsten Aussichtspunkte an der NC 500 - Lieblingsplätze

It is in the right sidebar when you scroll down.

On the page I created the component with a carousel, everything works fine. On all other pages I tried to insert the component the second image is missing and only an empty frame ist shown.
Then after I was logged out it seemed to work and I managed to insert it in the Single Post Template and the Homepage. Then suddenly it stopped to work on the homepage again but still works on the single page template
I tried several times to log out log in again, started the PC again and tried everything I could imagine but no chance. It still does only work on the orignial page and the template.

I tried it also on a page which has no columns - no main container and sidebar but just a one column container - there it seems to work. The page where I created it also has no columns.
But the most of my pages have the sidebar and a content container and wherever I try to put it there it does not work. The only page with sidebar where it works is the single post template.

About a week ago I had a quite similar problem with a component that did not work but started working after log out/log in.
What is wrong? Is it a bug? Is it a problem with my site?

Hi Barbara,
Thanks so much for your report!

It’s hard to say, but it could be that these global :nth-child pseudo-classes are causing problems:

Could you maybe delete them and see if it works then?

Best regards,
timmse

Yes, you are right. These are the problem.
What could I do then? If I delete them the homepage grid will not work without.
But the image of the page does not look like it should anyway :thinking: . Does it look like this for you? Which browser?
Thank you!

And with these nth childs on another template

it works fine…

Ok, if removing those global :nth-child rules fixes the issue, it is the selector scope, not a bug.

Do not use global :nth-child selectors for the layout. Use the already existing class on the homepage grid and rewrite the :nth-child rules so they only target items inside that specific grid (same as you do in the last example) like .hp-post-grid > *:nth-child(...) { ... }. That keeps the homepage grid styling, but prevents those rules from affecting other elements or layouts.

I’m using Arc (basically Chrome). It probably just looks a little strange because I disabled various things while examining the styles, or because the viewport width isn’t ideal in this case.