3

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!

Doc Roms
  • 3,288
  • 1
  • 20
  • 37
user1584161
  • 31
  • 1
  • 1
  • 2

4 Answers4

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

    background:#000;//is this what you want?
}
Robin Maben
  • 22,194
  • 16
  • 64
  • 99
0

for start have you think to remove defaukt browser padding and margin?

html{
    margin: 0;
    padding: 0;
}

Also, where is define your background?

  • in your first div?
  • in your body?
  • in your HTML ?

for better, background was define in your body tag :

body{
    background-color: #FCC; /* for test */
}

If you have no padding, no margin, this code working for you...

Doc Roms
  • 3,288
  • 1
  • 20
  • 37
0

Try this

body, html {

background:#000;
height:100%;
padding:0;
margin:0


}
Jitender
  • 7,593
  • 30
  • 104
  • 210
  • There were 2 separate sections above top-bg. One named html and the other body. Both already had magin 0 and padding 0 so I added background and height as you suggested above and it worked! Thank you SO much! – user1584161 Aug 08 '12 at 13:55
  • Glad I could help, body and html does have 100% height by default we need to set it. Also please mark my answer as correct answer :) – Jitender Aug 08 '12 at 13:57
0
html {
  background:#000;
}

This was sufficient for me to remove white space.

Rohan Rawat
  • 31
  • 1
  • 4