Making sure HTML div goes to the bottom of the screen.

I currently have a site that uses a two-tone background image that is centered on the page. On top of the background I have a div that is cenetered as well, so that the background on the left and right sides of my content are different. However on a few pages where the content is shorter than the screen length, it leaves an ugly stripe where the background is visible because the content doesnt stretch to the bottom. --------------------------------------- | | | | | | | | | | Content | | | | | | | |__________________| | | ugly bg | | | stripe ----> | | |________________|____________________| Im sure theres a way to fix this that wont require me re-writing the entire site, but I'm having trouble figuring it out right now. My background position is set to center repeat-y, so I cant offset it by 1/2 the fixed width of my div. Basically I need to figure out how to stretch my content to the bottom, or a way to slide my background over to the end of my content. Any ideas?

以上就是Making sure HTML div goes to the bottom of the screen.的详细内容,更多请关注web前端其它相关文章!

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

评论 抢沙发

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

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

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏