css 我的Flex容器项未按默认方向显示(行)

toiithl6  于 2023-01-18  发布在  其他
关注(0)|答案(1)|浏览(122)

I am trying to create YouTube UI clone I made navbar, then I made a container in which one div is for menu with class name "menu" and second div is for videos with class name "main", and I gave display flex to the container, the width of menu div is 15% and for videos width is auto or 85% (I tried both) and the problem is that the second div(videos) is not displaying along with menu div on the row direction.
一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个二个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个二个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个一个二个一个一个一个一个一个一个一个一个一个二个一个一个一个一个一个一个一个一个一个一个一个二个一个一个一个一个一个一个一个一个一个一个一个一个二个一个一个一个一个一个一个一个一个一个一个一个一个
the menu div and main div for videos should be in one row but I tried and I think there is something wrong in the code but what's that mistake I am not getting.

.container {
    display: flex;
    flex-wrap: wrap;
}

.menu {
    margin: 0;
    border-right: 1px solid rgb(179, 172, 172);
    width: 15%;
    display: flex;
    flex-wrap: wrap;
}

.main {
    display: flex;
    flex-direction: column;
    width: auto;
    margin: 0; 
}
5jvtdoz2

5jvtdoz21#

试着拆下软 Package

.container {
    display: flex;
}

相关问题