mihnsen / ui-carousel

A simple, lightweight module for carousel in your AngularJS app, Inspired from slick carousel.
http://mihnsen.github.io/ui-carousel/
MIT License
77 stars 67 forks source link

Location of slides are pulled to the left #28

Open seanmalter opened 7 years ago

seanmalter commented 7 years ago

Hey mihnsen,

I was playing with ui-carousel and noticed that my slides were not evenly distributed across the container, any idea what could cause this?

there is also a little bit of the next slide sticking out, but I suspect this will disappear when the slides are shifted

capture
dengue8830 commented 6 years ago

i had the same problem, just wrap the content on a div and add styles for that div

<carousel-item>
        <div class="text-center">
            <img ng-src="{{ item.imagenUrl }}" alt="{{ item.nombre }}" style="max-height:100px;" />
            <h3> {{ item.name }} </h3>
            <p> {{ item.description }} </h3>
        </div>
    </carousel-item>
seanmalter commented 6 years ago

@dengue8830 does .text-center have margin: auto?

dengue8830 commented 6 years ago

@seanmalter no, its only text-align: center;