Dhruv Dhruv - 1 year ago 76
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.

Answer Source

This should be the code.

body { /*or whatever element*/
    background-size:#px #px; /*replace size for #'s*/
    background-repeat: no-repeat;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download