Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7022093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:32:09+00:00 2026-05-27T23:32:09+00:00

I am making a background in the body element but when I make a

  • 0

I am making a background in the body element but when I make a background it uses the window height (only the visible height) and if the user scrolls the page down the background repeats it self. If I use no-repeat the rest of the page is in solid color.

I have used background-size: 100% 100%; but still not working.

I only want a background that goes from #ccc to #000 and fills the entire page without repeating itself…..

Can anyone be so kind and help me? Thanks in advanced!

EDIT:
My code is:

body {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;

    background-repeat: no-repeat;
    background: rgb(204,204,204);
    background: -moz-linear-gradient(top,  rgba(204,204,204,1) 0%, rgba(0,0,0,1) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(204,204,204,1)), color-stop(100%,rgba(0,0,0,1)));
    background: -webkit-linear-gradient(top,  rgba(204,204,204,1) 0%,rgba(0,0,0,1) 100%);
    background: -o-linear-gradient(top,  rgba(204,204,204,1) 0%,rgba(0,0,0,1) 100%);
    background: -ms-linear-gradient(top,  rgba(204,204,204,1) 0%,rgba(0,0,0,1) 100%);
    background: linear-gradient(top,  rgba(204,204,204,1) 0%,rgba(0,0,0,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#000000',GradientType=0 );
}

LAST EDIT:

body {
    background: #000;
    background-repeat: no-repeat;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); /* for webkit browsers */
}

note: The best solution I found. When I scroll the window you can see the background color because the background-image does not repeat and as the background-image ends with the same background color everything is ok!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:32:10+00:00Added an answer on May 27, 2026 at 11:32 pm

    Unfortunately, you cannot stretch out background images, so what you are seeing is actually what you’re supposed to see. Normally when sites use gradients as background images, they make it so the top of the gradient is flush with the top of the screen by setting background-position: 0 0, the gradient repeats itself horizontally by setting background-repeat: no-repeat, and then they set the background-color of the site to be the same color as the bottom of the gradient.

    There are ways using CSS3 and filters in which you can create gradients for users, but there is a limited amount of browser-compatibility for these features. Here is a fiddle containing a gradient: http://jsfiddle.net/Wexcode/qhMx9/. See this article for more information about those features.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using css to only print a section of a page: body { visibility:hidden;
I am making a website that uses numerous DIVs with a 100% height. Now
Setup I'm making an HTML page that replaces the cursor with a div element.
I am making cosmetic changes to a website but I am only able to
I'm making an auto-animated background swing for a web page and I don't know
I'm trying to get a background image of a HTML element (body, div, etc.)
I'm making a page to scale down to fairly small browser sizes, including on
I have the following HTML (note the CSS making the background black and text
I'm making a sound for the iPhone and I'm interested in adding background music
I'm making a simple interface that will allow a user to modify pieces of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.