0
문제점 : 아래의 코드는 데스크탑이나 랜드 스케이프 장치에서 올바르게 작동합니다. 하지만 모바일/응답보기로 전환하면 div 테두리가 표시되지 않습니다. 아래 코드에서 내가 뭘 잘못하고 있는지 모르겠다. 제발이 작은 문제에서 나를 빼내주세요.응답보기 경계에서 div에 표시되지 않습니다
헤드 코드 :
<meta name="viewport" content="width=device-width, initial-scale=1">
HTML 코드 :
<div class="ah-header">
<div class="ah-logo"></div>
<div class="ah-navbar-searchbar"></div>
<div class="ah-nav"></div>
</div>
CSS 코드 :
.ah-header {
padding: 9px;
background-color: rgb(25, 118, 210);
display: table;
width: 100%;
min-height: 50px;
max-height: 150px;
.ah-logo {
display: table-cell;
width: 250px;
border: 1px solid yellow;
}
.ah-navbar-searchbar {
display: table-cell;
position: relative;
/* Firefox */
width: -moz-calc(100% - 500px);
/* WebKit */
width: -webkit-calc(100% - 500px);
/* Opera */
width: -o-calc(100% - 500px);
/* Standard */
width: calc(100% - 500px);
border: 1px solid yellow;
}
.ah-nav {
display: table-cell;
position: relative;
/* Firefox */
width: 250px;
border: 1px solid yellow;
}
@media only screen and (max-width : 320px) {
.ah-header {
padding: 0px !important;
display: block !important;
max-height: 150px !important;
}
.ah-logo, .ah-navbar-searchbar, .ah-nav {
display: table-row !important;
border: 1px solid yellow;
height: 50px !important;
}
}
'.'before'.ah-logo {' – Banzay