Ask coding questions

← Back to all posts
Background Problem
QuickV

I'm having background problems....

Anyone know how to make a background image centered and fit any screen nicely?

The image is a div btw, which could the the cause of the problem.... I just didn't want the image be in the

area, and instead be in something like

Anyone know a solution?

Voldemort refers to Chuck Norris as "You-know-who".

Voters
QuickV
Comments
hotnewtop
sn236

@QuickV I have the solution
try this-

If you want the image to come on the whole screen use the width as 1370px

QuickV

Thanks!... But it doesn't work when I increase my screensize lol... I'll think of a solution :D @sn236

ruiwenge2

try this:

QuickV

is it possible to do it without it being in the body, like let's say a div :thonk: @ruiwenge2

Coder100

you could specify a width and height to the div to further 'configure' background size @QuickV

QuickV

I tried that earlier, but I didn't work well for me :( @Coder100