Browser automatically setting height of content div

I have generated a site using wordpress. The pages of the site have content enclosed in a div as follows:
For reference, here are the css rules: #content { background: white url('images/hatch-light.png') repeat; box-shadow: 0px 0px 2px #333; -moz-box-shadow: 0px 0px 2px #333333; -webkit-box-shadow: 0px 0px 2px #333; width: 760px; position: absolute; left: 200px; z-index: 15; } When I view this source I see this reflected. However, using chrome if I inspect the content element, I see that a height is inserted into the div style. I see:
The height is the height of my browser window. The problem I am encountering is that the content div no longer encapsulates it's content (for example, the content div has a background style and this background style no longer extends below the height as defined by my browser). Can anybody tell me how I can prevent the height from being set by the browser?
If 702 is the height of your viewport, my guess is that there is some JavaScript doing this. (Highly suspect JS, IMO, as the correct way would be to add style="height:702px")

以上就是Browser automatically setting height of content div的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准