Krystian
Krystian

Reputation: 987

bootstrap carousel with menu, show active class

might be a stupid questions, as I am a beginner: This carousel can either slide automatically or via navigation. I've got 3 little problems with it:

  1. when its sliding automatically, the navigation does not change the active list-element. I found this code, but I am not sure how to make this work or if there is any better solution:

    $('#myCarousel').on('slide.bs.carousel', function () { // do something… })

  2. I want to change the active Item to be like on hover. I tried like leistungenNav ul li a:active but nothing worked. Do you know whats wrong in my code?

  3. Out of some reason my media-query isn't working. I cannot understand why

    @media (min-width:600px;) { .leistungenNav li { float: left; border: 1px solid grey; width: 20%; text-align: center; }
    }

This is my code: https://jsfiddle.net/7Lta9vra/

Upvotes: 0

Views: 931

Answers (1)

shelune
shelune

Reputation: 106

  1. Your indicator ul needs to have the class .carousel-indicators. You'll have to style them so they're not dots any more though.

  2. It's not a:active but a.active since active is a class, not a pseudo selector.

  3. Drop the semicolon at the end of @media (min-width:600px;).

Upvotes: 3

Related Questions