openfrog
openfrog

Reputation: 40735

How to set the background image of an DIV in CSS?

How to set the background image of an DIV in CSS?

Upvotes: 10

Views: 22007

Answers (2)

Prateek
Prateek

Reputation: 1556

background-image: url('image path');

Put this block of code in your CSS to set the background image.

Upvotes: 12

openfrog
openfrog

Reputation: 40735

Put this in your <DIV> class or ID block:

background-image:url('../img/bg.png');

Upvotes: 7

Related Questions