1

Before any thing thanks for pay attencion to me.

I just want to make a grandient.

So in HTML i have create a div simple as that.

Code:

body {
}

.containerallbody {
  width: 800px;
  height:  300px;
  background-color: #0076b4;
  background-image: -moz-linear-gradient (top, #0076b4 0%, white 100%);
  background-image: -webkit-linear-gradient (top, #0076b4 0%, white 100%);
  background-image: linear-gradient (top, #0076b4 0%, white 100%); /*STANDARD*/
}
<body>
  <div class="containerallbody">

  </div>
</body>

I have try Safari, Chrome, Firefox and IE. I Try also every thing that shows on w3scholls. And i have seen a lots of videos on youtube talking about this, i dont know what to do more. I just want a simple background cover all the body with a linear grandient from blue to white.

Can anyone save me please?

2
  • I have try also istend using background-image: just background: and nothing Commented Aug 30, 2017 at 1:52
  • check the answer posted and let me know if its fine... Commented Aug 30, 2017 at 1:58

1 Answer 1

6

You have an extra space after the linear-gradient.

body {
}

.containerallbody {
  width: 800px;
  height:  300px;
  background-color: #0076b4;
  background-image: -moz-linear-gradient(top, #0076b4 0%, white 100%);
  background-image: -webkit-linear-gradient(top, #0076b4 0%, white 100%);
  background-image: linear-gradient(top, #0076b4 0%, white 100%); /*STANDARD*/
}
<body>
  <div class="containerallbody">

  </div>
</body>

Sign up to request clarification or add additional context in comments.

2 Comments

YOU are just amazing! I have start HTML not long ago, i dont realize that may hapen. Thanks!
You can also use linear-gradient(#0076b4, white);. Top to Bottom is default

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.