Мои flex-container1 и 2 работают так, как я намереваюсь и выкладываю правильно .... но для flex-container3 он не отображается так, как я собираюсь.
Это то, что я хочу: https://imgur.com/YduJejq
Но если вы запустите код, который у меня есть, он не будет отображаться правильно.
body,
html {
display: flex;
height: 100vh;
min-height: 100vh;
flex-direction: column;
//overflow: hidden;
margin: 0;
padding: 0;
}
img {
margin-right: 10px;
margin-bottom: 5px;
}
.noDisplay {
//display: none;
}
.flex-container1 {
display: flex;
min-height: 5vh;
height: auto;
}
.flex-container2 {
display: flex;
height: auto;
min-height: 70vh;
}
//container 3 info
.flex-container3 {
display: flex;
height: auto;
min-height: 23vh;
}
#submitImageButton {
align-self: center;
}
#storyTellerImageChoice {
align-self: center;
}
#playAgainButton {
align-self: center;
}
#displayCardsHand {
display: flex;
height: auto;
flex: 5;
justify-content: center;
border: solid red;
}
#displayCardsEveryone {
display: none;
height: auto;
flex: 5;
border: solid blue;
}
#scoreBoard {
display: flex;
flex-direction: column;
flex: 1;
}
#scoreTitle {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
}
#scores {
flex: 6;
border: black;
}
.borderRed {
border-style: solid;
border-color: red;
}
.borderOrange {
border-style: solid;
border-color: orange;
}
.borderBlack {
border-style: solid;
border-color: black;
}
#websiteTitle {
display: flex;
flex: 0.5;
align-items: center;
justify-content: center;
}
#gameTitle {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
}
#specialGameMessages {
display: flex;
flex: 5;
align-items: center;
justify-content: center;
}
#exitButton {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
}
#gameInstructionsButton {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
}
#videoChat {
flex: 5;
}
#chat {
display: flex;
flex-direction: column;
flex: 1;
}
#chatWindow {
flex: 7;
overflow: auto;
}
#inputArea {
display: flex;
flex: 0.7;
}
#chatInput {
flex: 1;
}
#chatSubmitButton {}
;
<div class="flex-container1 borderRed">
<div id="websiteTitle">
</div>
<div id="gameTitle">
</div>
<div id="specialGameMessages">
</div>
</div>
<div class="flex-container2 borderOrange">
<div id="videoChat">
<div id="remote-media"></div>
<div id="local-media"></div>
</div>
<div id="chat" class="borderRed">
<div id="chatWindow">Hello Thar!</div>
<div id="inputArea">
<textarea id="chatInput"></textarea>
<button id="chatSubmitButton">Chat!</button>
</div>
</div>
</div>
<div class="flex-container3 borderBlack">
<div id="displayCardsHand">
<img id="one" class="noDisplay" src="images/img1.jpg">
<img id="two" class="noDisplay" src="images/img2.jpg">
<img id="three" class="noDisplay" src="images/img3.jpg">
</div>
<div id="displayCardsEveryone">
</div>
<div id="scoreBoard" class="borderOrange">
<div id="scoreTitle">
<div>Hi</div>
</div>
<div id="scores">There</div>
</div>
</div>
Во-первых, это выглядит как min-height: 23vh не работает для моего flex-container3.
Кроме того, мои displayCardsHand и ScoreBoardнаходятся в разных строках, а не в одной роли.
Не знаете, в чем моя проблема? Спасибо!