Skip to content
Sign upLog in
← Back to Community

How do I add a background image to my website?

Profile icon
RYANBEEBE

How do I add a background image to my website

Voters
Profile icon
Arran-Iain-Craw
Profile icon
Dan-IvanIvan1
Profile icon
LeilaArmand
Profile icon
EmelyOrtiz1
Profile icon
Rhyen-WiloH
Profile icon
mahithaprasad
Profile icon
soyombo5502
Profile icon
Franchesca-Nico
Profile icon
NafiAbubakar
Profile icon
JosephD14
Comments
hotnewtop
Profile icon
[deleted]

As I understand you want to have a fullsize background image. This can be done via

body, html { height: 100%; } .bg { /* The image used */ background-image: url("img.jpg"); /* Full height */ height: 100%; /* Center and scale the image nicely */ background-position: center; background-repeat: no-repeat; background-size: cover; }
Profile icon
katyadee

@enigma512
Thanks Enigma! We appreciate all your contributions :)

Profile icon
703337

@qualladoom
Doesn't work.

Profile icon
azda

you add it with skill

Profile icon
katyadee

Hey

@RyanBeebe
, I edited your post so your question is in the subject line. That way users who might have an answer can find it more easily :)

Profile icon
GaryBurden

Invalid image url

Profile icon
Vibrursan

It's strange when people answer funny to such important topics like this. I want to discover too the knowledge of putting the background on a website or forum. I worked hard doing various pictures for my future forum on https://depositphotos.com/upscaler.html and it helped me a lot. I expected that I should use professional programs like adobe photoshop. Somehow I got the chance to try myself in this stuff, and thanks to that, we got such handy websites.