[英]When I resize my browser my content falls outside of my header how can I stop this?
我的標題中包含h1,我想知道如何在調整瀏覽器大小時使標題響應和調整大小,以使內容不會溢出到標題上。 如果可以解決我的問題,我可以完全重做代碼。
#header { max-height:110px; background-color: darkorange; border: 1px solid burlywood; border-bottom: 1px solid black; }
<h1> Guide to Painting:A guide to getting your painting projects done efficiently and quickly!</h1>
根據您所說的“落在瀏覽器之外”的意思,解決方案可能是將max-height交換為min-height。
#header { min-height: 110px; background-color: darkorange; border: 1px solid burlywood; border-bottom: 1px solid black; }
<div id="header"> <h1> This is a long text might overflows to the right if the window is narrow </h1> </div>
https://jsfiddle.net/8jnofysv/
不幸的是,您的問題陳述含糊不清,可能有很多含義,我的特定解決方案只能解決其中的一種
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.