www.webdeveloper.com
Results 1 to 8 of 8

Thread: Website background - Why is this happening?

  1. #1
    Join Date
    Aug 2009
    Posts
    43

    Website background - Why is this happening?

    Hi, I'm setting up a site at the moment and I created a gradient through Photoshop. The dimensions of the gradient are 1px * 520px (width * height). I then put in the following code:

    Code:
    body 
    {
    	background: #72c1cf url(gradient.gif);
    	background-repeat: repeat-x; 
    	margin: 0;
    }
    However, sometimes when I open the page there is a white gap at the bottom of the page. I have to refresh the page for the white gap to be replaced by the "#72c1cf" color. Please see the attached screenshot for an understanding of what I'm referring to. Can anyone please advise why this is happening and if there is a solution for it. It is really annoying.
    Attached Images Attached Images

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Don't mix the general background property with its sub-properties. If you decided to use the main, comprehensive property, then write all the values within.
    Code:
    body 
    {
    	background: #72c1cf url(gradient.gif) repeat-x;
    	margin: 0;
    }
    [
    Last edited by Kor; 08-16-2010 at 09:10 AM.

  3. #3
    Join Date
    Aug 2009
    Posts
    43
    Thanks for your response Kor. Much appreciated. Hopefully that will do the trick. Best of luck tonight against Newcastle!

  4. #4
    Join Date
    Aug 2009
    Posts
    43
    Hi, unfortunately this issue is still occurring. I've cleared the cache on the 3 browsers and it's still an issue. If anyone has any other suggestions then I'd appreciate it. Thanks

  5. #5
    Join Date
    Aug 2006
    Posts
    1,885
    Have you validated your site? I've found sometimes that a site with errors will cause such display problems. You might also post a link to the site so folks could actually chase down the issue.

    Dave

  6. #6
    Join Date
    Aug 2009
    Posts
    43
    Hi Dave,

    I validated the site there. There were two errors and I fixed them. Two meta tags at the top weren't closed. It's still giving one warning in relation to the UTF-8 character encoding. The link to the site is here. Hopefully the validation will rectify the issue. It doesn't happen that often, maybe a few times a day.

    Thanks

  7. #7
    Join Date
    Aug 2010
    Posts
    4
    Weird thing I find out is that if you have firebug installed and used it for the site that sometimes the space where firebug usually pop ups at will be overlayed with a white background. It bugs out sometimes but not all the time for me.

    Have you been able to reproduce it in another browser besides Firefox?

  8. #8
    Join Date
    Aug 2009
    Posts
    43
    Quote Originally Posted by Kacheeto View Post
    Weird thing I find out is that if you have firebug installed and used it for the site that sometimes the space where firebug usually pop ups at will be overlayed with a white background. It bugs out sometimes but not all the time for me.

    Have you been able to reproduce it in another browser besides Firefox?
    Hi Kacheeto,

    That's strange. To be honest I didn't even use Firebug or Firefox when designing the page. I always use Chrome when developing. I've been able to replicate it in Chrome and IE. I have checked Firefox a few times and it's working fine. Saying that I haven't seen it happen in a day or two now. Hopefully it's OK but knowing my luck I'll see it again in a few minutes. I'll keep you updated.

    thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles