[英]Setting Height to 100% Not Working and Unknown CSS Change
I'm working on http://pizzli.com/darrenwp/?p=107 . 我正在http://pizzli.com/darrenwp/?p=107上工作。 When I try and set the post background height to 100% to extend the background to the entire length of the post, it doesn't work, however changing the number of pixels does.
当我尝试将帖子背景高度设置为100%以将背景扩展到帖子的整个长度时,它不起作用,但是更改像素数可以。 One other problem is the HTML> seemed to set a Margin-Top: 28px !important and I'm not sure where this is coming from.
另一个问题是HTML>似乎设置了Margin-Top:28px!important,我不确定这是哪里来的。 Any help would be appreciated.
任何帮助,将不胜感激。
If there is a float
in an element so you have to clear
his parent. 如果元素中有
float
,则必须clear
其父元素。 write now inside #postbg
the child
have float
on it so we have to clear it. 现在在
#postbg
里面#postbg
, child
已经float
在上面,所以我们必须清除它。 Write like this: 这样写:
#postbg {
overflow: hidden;
}
In style.css your #postarea is declared twice. 在style.css中,您的#postarea声明了两次。 The second declaration looks like this:
第二个声明如下所示:
#postarea{
float:left;
display: inline-block;
}
That could be overriding the height definition in the first 这可能会覆盖第一个中的高度定义
margin-Top: 28px !important
Is for the workpress bar on the top of the page. 用于页面顶部的工作条。 Its not the problem.
这不是问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.