Sandeep Sandeep - 2 years ago 80
HTML Question

Adding a background image to a <div> element

Is it possible to make a

element contain a background image, and if so, how would I go about doing this?

Answer Source

You mean this?

<style type="text/css">
.bgimg {
    background-image: url('../images/divbg.png');


<div class="bgimg">
    div with background
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download