消除页面底部的空白 [英] Eliminating white space at bottom of page

查看:152
本文介绍了消除页面底部的空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

原本我有一个背景图像,作为渐变背景出现。想要有一个坚实的黑色背景,我删除链接到背景图片/重复x。结果是页面底部有一个很大的空白区域。我已经搜索了很多关于这个常见问题的答案,但是没有人帮我解决这个问题。



这是一个.php网站,所以如果有一个html .div,那么我找不到它,但在CSS样式表中,它只是读取#top-bg与背景:#000000



我试过在高度添加:100%;不确定在某些网站推荐的位置调整边距。
任何帮助将不胜感激!

解决方案

  body,html {
填充:0!重要;
保证金:0!重要;

背景:#000; //这是你想要的吗?
}


Originally I had a background image that appeared as a gradient background. Wanting to have a solid black backgound I removed link to background image/repeat x. The result is a large white space at bottom of page. I have searched quite a few answers to this common problem but none have helped me figure this out.

This is an .php site so if there is an html .div then I cannot find it but in css stylesheet it just reads as #top-bg with background: #000000

I have tried adding in height: 100%; not sure where to adjust margins as recommended by some sites. Any help would be greatly appreciated!

解决方案

body, html{
    padding:0!important; 
    margin:0 !important;

    background:#000;//is this what you want?
}

这篇关于消除页面底部的空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆