Background Color Not Working on Short...

User 603315 Photo


Registered User
938 posts

I would have to test it to be sure but all you need without comments :cool: is to have html then your bg colour you don't need all the padding etc, it does it automatically, why take 10 steps when 1 will do :D
User 315488 Photo


Registered User
90 posts

Eric Rohloff wrote:
html, body {
margin: 0;
width: 100%;
height: 100%;
}


Eric, I tried this and it fixed the short pages, but broke the longer pages. They now have the same display problem as the short ones did. ;(

I messed around with it a bit and tried a couple of suggestions I found on Google.
Here's what fixed the problem:
html {
background: rgb(189,214,224);
background: -moz-linear-gradient(top, rgba(189,214,224,1) 0%, rgba(13,50,87,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(189,214,224,1)), color-stop(100%,rgba(13,50,87,1)));
background: -webkit-linear-gradient(top, rgba(189,214,224,1) 0%,rgba(13,50,87,1) 100%);
background: -o-linear-gradient(top, rgba(189,214,224,1) 0%,rgba(13,50,87,1) 100%);
background: -ms-linear-gradient(top, rgba(189,214,224,1) 0%,rgba(13,50,87,1) 100%);
background: linear-gradient(to bottom, rgba(189,214,224,1) 0%,rgba(13,50,87,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bdd6e0', endColorstr='#0d3257',GradientType=0 );
padding-bottom:40px;
text-align: center;
background-repeat:no-repeat;
background-attachment:fixed;
}


I added the 2 lines at the bottom - background-repeat:no-repeat and background-attachment:fixed.
Thanks for your help and suggestions. I often feel like a total newbie. :)
User 315488 Photo


Registered User
90 posts

Steve wrote:
Hey Ron,

Very nice website! I like the look and feel of it. Colors go well together, very informational, nice visual graphics you did a great job with this design. Other than fixing up your background on some pages you have great website.

Have you tried what Eric suggested?


Thanks - I appreciate your feedback.
Yeah, I finally fixed it (as mentioned in previous post) by doing something else, but the help here led me to find the right answer.
That's one of the major reasons I use CC software. The forums here are better than anywhere else and the software is very good and easy to use too. Except for the picture slider, everything was built using CC software.
User 603315 Photo


Registered User
938 posts

Well done Ron on getting it fixed. I don't think you need to use repeat etc when it's in html but hey many ways to skin a cat :P

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.