Dhruv Dhruv - 3 months ago 5x
CSS Question

How to set a width of the background (HTML and CSS)

So I want to make the gradient in the background of my webpage to not keep going and have a width. I am not sure how to do this and I tried in the css but it didn't work.


My Css

I'm sorry that my css it is a bit blurry but I had to fit it in one screenshot.


This should be the code.

body { /*or whatever element*/
    background-size:#px #px; /*replace size for #'s*/
    background-repeat: no-repeat;