html - 随内容一起扩展页眉和页脚

标签 html css

问题

| <---- 标题 ----|................|

| <-------- 发布内容--------> |

| <----页脚----|................|

这是一个活生生的例子:

版本 1:http://myreadingmanga.info/wordpress/?p=1588 [图像大于窗口大小]

版本 2:http://myreadingmanga.info/wordpress/?p=1603 [图像适合窗口]

在版本 1 中,页眉和页脚省略了空间并且没有覆盖整个窗口。

我需要它是动态的,以便它根据图像大小扩展。我在其他主题上得不到太多帮助。所以,如果你能提供帮助,那就太好了。

最佳答案

是的,我已经检查了整个 css 规则。请从规则中删除 width:auto

body.single .content {
    padding: 0 20px;
    /*width: auto;*/
}

它在我的系统上完美运行 enter image description here

关于html - 随内容一起扩展页眉和页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20789511/

相关文章:

html - 使 <li> 元素展开以填充父容器

css - 编辑 .svg 以制作动画 - XML

javascript - 如何将 CSS 样式应用于 jquery 的 append() 创建的元素?

javascript - HTTP 请求未正确发送数据

html - 如何按比例缩放此 flexbox tiles 网格

css - 无法更改页脚中链接的颜色

javascript - 加载时全屏

HTML/CSS : Position shifting with link that increase font size when hovering mouse

html - 试图让 DIV 占据 100% 的视口(viewport)(div 转义父 div)

javascript - textarea 中的输入不显示为输入的内容