两个彼此相邻的自举转盘不会对齐

时间:2021-10-18 08:35:40

I'm trying to get two bootstrap carousels to align with each other so they are in the same row. When on a xs or sm device they carousels are stacked properly like I want them, but on md and lg devices the carousels need to sit next to each other, not vertically or offset like they are now.

我正试图让两个自举转盘相互对齐,这样它们就在同一排。当在xs或sm设备上时,它们的旋转传感器按照我想要的方式正确堆叠,但在md和lg设备上,旋转木马需要彼此相邻,而不是像现在一样垂直或偏移。

Any idea why this may be happening? I originally thought it was a padding issue but I can't seem to adjust it properly.

知道为什么会这样吗?我原本以为这是一个填充问题,但我似乎无法正确调整它。

The site can be found here: http://mylomatt.mylio.com/*.html

该网站可以在这里找到:http://mylomatt.mylio.com/*.html

1 个解决方案

#1


2  

I would move the <div class="container col-md-6 col-md-pull-6 carouselpadding"> (the div wrapping your "Welcome to Mylio Support" carousel) out of the larger wrapper class

我会移动

(包装你的“欢迎来到Mylio支持”旋转木马的div)从更大的包装类中移出

<div class="container col-md-6 col-md-push-6"> 

So that it looks like

所以它看起来像

<div class="container col-md-6 col-md-push-6"> 
    <!-- first carousel -->
</div>
<div class="container col-md-6 col-md-pull-6 carouselpadding"> 
    <!-- second carousel -->
</div>

I think you meant for them to be separate, but because the second carousel was actually contained in a wrapper div for the first, any styles you applied to the first would also cascade down into the second, which is difficult to fix if not expected.

我认为你的意思是它们是分开的,但是因为第二个旋转木马实际上包含在第一个包装div中,你应用于第一个的任何样式也会级联到第二个,如果不是预期的话很难修复。

#1


2  

I would move the <div class="container col-md-6 col-md-pull-6 carouselpadding"> (the div wrapping your "Welcome to Mylio Support" carousel) out of the larger wrapper class

我会移动

(包装你的“欢迎来到Mylio支持”旋转木马的div)从更大的包装类中移出

<div class="container col-md-6 col-md-push-6"> 

So that it looks like

所以它看起来像

<div class="container col-md-6 col-md-push-6"> 
    <!-- first carousel -->
</div>
<div class="container col-md-6 col-md-pull-6 carouselpadding"> 
    <!-- second carousel -->
</div>

I think you meant for them to be separate, but because the second carousel was actually contained in a wrapper div for the first, any styles you applied to the first would also cascade down into the second, which is difficult to fix if not expected.

我认为你的意思是它们是分开的,但是因为第二个旋转木马实际上包含在第一个包装div中,你应用于第一个的任何样式也会级联到第二个,如果不是预期的话很难修复。