关于 this page (响应式站点进行中)包含的 div(文章)的背景图像与最长的句子 (p) 一样宽。所以它们不像列那么宽(#main = 30em)。我如何使用 CSS 使所有 div 与列一样宽并且仍然保持它们的响应能力?
#agenda #main article {
margin-bottom: 1em;
background: #fff url() repeat;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
border: 0;
}
#agenda #main article h3 {
color: #666;
letter-spacing: 0.2em;
text-transform: lowercase;
line-height: 100%;
margin-bottom: .4em;
padding-top: .4em;
}
#agenda #main article h4 {
color: #666;
letter-spacing: 0.2em;
text-transform: lowercase;
line-height: 100%;
margin-bottom: .4em;
padding-top: .4em;
}
#agenda #main article p {
color: #666;
}
最佳答案
您需要从您的 css 中的 #main article
中删除 float: left
(第 402 行)或使用 float: none
覆盖它>.
关于css - 如何使内部 div 与父级(列)一样宽并且响应迅速?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11235689/