CSS - 为什么高度似乎已设置,但实际上并未设置?
好吧,这真的很烦人,我不明白为什么会发生这种情况。 当我试图让CSS粘页脚工作时,我可能搞砸了一些东西。
我正在进行一项,但身体似乎不是液体,所以我想尝试一下这个: http://ryanfait.com/sticky-footer/
但结果却是这样的: http://www.serverbart.com/film/
蓝色框应该类似于画廊,所以不用介意颜色:p 我想您会明白我想要做什么,并且我愿意接受有关重新设计 div 结构的意见!我正在尝试真正擅长不同的布局,而这个布局一直困扰着我。
Ok, this is really annoying and I can't understand why this is even happening.
I may have screwed some stuff up when trying to get the CSS Sticky footer to work.
I had one going on, but it seemed at the body wasn't liquid so I thought I'd try this one:
http://ryanfait.com/sticky-footer/
But the results ended up like this:
http://www.serverbart.com/film/
The blue box is supposed to resemble a gallery, so nevermind the color :p
I guess you'll understand what I'm trying to do, and I'm open for input about redesigning the div structure! I'm trying to get really good at different layouts and this one has been bugging me a bit.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你没有效仿 Ryan Fait 的榜样。对于初学者来说,推送进入包装器内部。
You are not following Ryan Fait's example. For starters, the push goes inside wrapper.
这是因为你有这个:
我花了很长时间才弄清楚我第一次创建粘性页脚时做错了什么,它必须是这样的
你必须明确地将 2 个 div 作为最外层的 div,而不仅仅是一个主要包装。
It's because you have this:
It took me forever to figure out what i was doing wrong the first time i created a sticky footer as well and it has to be like this
You have to explicitly have 2 divs as your outermost divs, not just one main wrapper.
推送和页脚的高度必须相同。推力必须进入包装纸内部。
The height for the push and the footer must be the same. The push must go inside the wrapper.