Align Main Slider image to center

2019-09-24 11:06发布

I'm working on a small project, and have one little problem that I don't know how to resolve myself. I have an image gallery with many images, but I want the active image to be centered, without changing the resolution or width/height ratio. Link for the issue here. Login is user / password. I tried to manipulate with this CSS:

.img {
    margin-left: 200px;
}

However, it seems to ruin the bottom slider. What should I do to center the main image without changing the image ratio? This example image shows what I want to do.

enter image description here

2条回答
我想做一个坏孩纸
2楼-- · 2019-09-24 11:15

Try adding:

.flex-active-slide {
  text-align: center;
}
查看更多
\"骚年 ilove
3楼-- · 2019-09-24 11:32

Try this

.imgs {
    margin-left: auto;
    margin-right auto;
}

or you could do this

<div class="imgs" align="center">
<img src="https://source.unsplash.com/random/200x200" />
</div>

查看更多
登录 后发表回答