[英]how do i get rid of this overflow issue?
on this page ( http://whitewashed.richiesiegel.com ), when the page width is < 400px there is some extra room on the right that i'd like to get rid of. 在此页面( http://whitewashed.richiesiegel.com )上,当页面宽度<400px时,我想摆脱右边的一些多余空间。
here's the media query 这是媒体查询
@media handheld, screen and (max-width: 400px) {
#nav {
height: 30px;
background-color: white;
font-size: 1.3em;
padding-top: 9px;
padding-bottom: 10px;
text-transform: uppercase;
overflow: hidden;
}
#nav span {
color: #272732;
letter-spacing: .192em;
font-family: "brandon-grotesque",Helvetica,sans-serif;
font-weight: 100;
text-transform: uppercase ;
}
}
any ideas? 有任何想法吗? overflow or margin issue?
溢出或保证金问题?
From what I can see, your nav has nothing to do with this. 据我所知,您的资产净值与此无关。 I've located one element that is causing this:
#footnote
has a calculated width of 475px at viewport of 400px. 我找到了一个引起这种情况的元素:#footnote在400px的视口中具有
#footnote
的计算宽度。 You can easily fix this one by using box-sizing: border-box;
您可以使用
box-sizing: border-box;
轻松解决此问题box-sizing: border-box;
on that element (with the -moz- and -webkit- prefixes in addition). 在该元素上(还带有-moz-和-webkit-前缀)。 Fixing this div fixes most of your whitespace issue.
修复此div可以解决大多数空白问题。
The rest of the additional space seems to be caused by your .text
and .intro
divs. 其余的额外空间似乎是由您的
.text
和.intro
div引起的。 At 400px viewport, .text
are a total of 410px wide and .intro
is 420px, which appears to be some margin and/or padding. 在400px的视口中,
.text
的宽度.intro
为410px,.intro的宽度为420px,这似乎有些空白和/或填充。 You can do similar to above by using box-sizing or shrink the width. 您可以使用框大小或缩小宽度来执行与上述类似的操作。
If you go the box-sizing
route, which I highly recommend for responsive design because it accounts for padding and borders when calculating width, you'll need to increase the padding to give your text some room to breathe. 如果您采用
box-sizing
路线,我强烈建议您采用自适应设计,因为它在计算宽度时会考虑填充和边框,您将需要增加填充以给文本留出一定的呼吸空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.