Altaula
Altaula

Reputation: 784

CSS - wrong linear-gradient

Why is the background gradient wrong at the end of the page if I resize the window?

http://jsfiddle.net/hca6zz20/2/ - better example of the gradient from red to blue

http://jsfiddle.net/hca6zz20/

html,
body {
  height: 100%;
}

body {
  background-image: linear-gradient(#363663, #1b1b32);
  margin: 0;
}

Result

Upvotes: 4

Views: 120

Answers (2)

lmgonzalves
lmgonzalves

Reputation: 6588

You need to change:

html,
body {
  height: 100%;
}

To:

html,
body {
  min-height: 100%;
}

DEMO

FULLSCREEN DEMO

Upvotes: 3

user5295866
user5295866

Reputation:

your white div overflows so you need to change body from 100% to auto.

html,
body {
   height: auto;
}

Upvotes: 2

Related Questions