所以我遇到了一些問題,我無法修復了一段時間。這是大學課程的作業,我不能更改html文檔。只應用純CSS。問題是,當我調整我的瀏覽器。內容div從右側溢出側邊欄div。我該如何解決這個問題?CSS的div四溢。 (調整瀏覽器時)
.centered-content {
white-space: nowrap;
width: 75%;
min-width: 600px;
margin-left: auto;
margin-right: auto;
background-color: rgba(246,246,246,0.9);
border: 1px solid blue;
overflow:hidden;
}
.main-container {
position: relative;
float: right;
border: 2px solid red;
display: inline-block;
width: 85%;
margin: auto;
white-space: normal; /*Prevents child elements from inheriting nowrap.*/
}
#menu-add {
position: absolute;
width:15%;
min-width: 180px;
height: 100%;
border: 1px solid green;
display: inline-block;
}
HTML DOC的意見。
你能分享這個html嗎? – Zac
https://pastebin.com/DVVWkmeD – revengeance