/    Sign up×
Community /Pin to ProfileBookmark

CSS Background Gradient Issue

I am experiencing an issue with a background gradient I created using CSS.

Below is an image of the issue:

[img]https://goo.gl/photos/5x8eu5bNFrJmQGTf9[/img]

The issue I am having is that the gradient starts to repeat itself after a certain height. I do not want it to do so. If my page is 750px high, I want the gradient to be 750px high, too — no more, no less. I want the size of the gradient to change, depending on the size of that particular page. What am I doing incorrectly? Below is my CSS code:

[code=html]
body {
background: #98cbfe; /* For browsers that do not support gradients */
background-repeat: no-repeat;
background: -webkit-linear-gradient(#98cbfe, #89b7e5, #7aa3cc); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(#98cbfe, #89b7e5, #7aa3cc); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(#98cbfe, #89b7e5, #7aa3cc); /* For Firefox 3.6 to 15 */
background: linear-gradient(#98cbfe, #89b7e5, #7aa3cc); /* Standard syntax */
height: 900px;
}

#container {
margin-left:auto;
margin-right:auto;
height:200px;
width:940px;
}
[/code]

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@jedaisoulSep 08.2016 — Hmm. I've not tested it, but try:

<i>
</i>body {
background: #98cbfe; /* For browsers that do not support gradients */
background: linear-gradient(#98cbfe, #89b7e5, #7aa3cc); /* Standard syntax */
height: 100%;
}
×

Success!

Help @Wahoo92583 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...