how do i put an image as the backround in html?
So to do this, in your style.css add:
style.css
body { background: url(img.png); }
But make sure img.png is an actual image (replace img.png with the image of your choice).
img.png
Also, to make sure the image is full-size, read this:
html { background: url(img.png) no-repeat center center fixed; background-size: cover; }
Read more about backgrounds here and here
oh, that's because those aren't valid images
How do i put an image as a backround in html
how do i put an image as the backround in html?
@Coder100 by any chance can you tell me if you know? or anyone.So to do this, in your
style.css
add:But make sure
img.png
is an actual image (replaceimg.png
with the image of your choice).Also, to make sure the image is full-size, read this:
Read more about backgrounds here and here
oh, that's because those aren't valid images
@cmglj