Html 使浮动图元保持其位置

Html 使浮动图元保持其位置,html,css,Html,Css,我有一个这样的结构。我面临的问题是: 当屏幕的x轴小于y轴时,按钮工具栏(黑色)跳到屏幕顶部。如果x轴更小,我的字段集将从botton工具栏中垂直展开。如何解决此问题并使字段集保持其位置? 我尝试使用溢出,但没有成功。不要使用浮动:左 将.dhFieldset元素设置为显示:内联块然后将其容器.dhbuttonoolbar设置为空白:nowrap @media screen and (max-aspect-ratio: 1/1) { .dhFieldset{ displ

我有一个这样的结构。我面临的问题是: 当屏幕的x轴小于y轴时,按钮工具栏(黑色)跳到屏幕顶部。如果x轴更小,我的字段集将从botton工具栏中垂直展开。如何解决此问题并使字段集保持其位置?
我尝试使用
溢出
,但没有成功。

不要使用
浮动:左

.dhFieldset
元素设置为
显示:内联块
然后将其容器
.dhbuttonoolbar
设置为
空白:nowrap

@media screen and (max-aspect-ratio: 1/1) { 
    .dhFieldset{
        display:inline-block; /*Added this line and remove the float:left*/
        height:37px;
        width:auto;
   }
}

@media screen and (max-aspect-ratio: 1/1) { 
    .dhButtonToolbar {
        height: 60px;
        left:5px;
        width:100%;
        right: 5px; 
        white-space:nowrap; /*added this line*/
    }
}

演示

我不明白您想了解什么?当屏幕变大或变小时,你们想要像往常一样的黑色和红色屏幕吗?让我知道?