Below attached my css code ..
body {
background-image:url('{!$Resource.background}');
}
.details{
margin:0px 0px 90px 350px;
padding:30px 0px 20px 0px;
width:300px;
height:400px;
border:1px solid;
border-radius:5px;
}
.input{
width:250px;
height:25px;
border-radius:3px;
padding : 0px 0px 0px 0px;
}
.error{
text-align:left;
color:red;
margin:0px 70px 0px 25px;
}
using this css code created one static resource that static resource i am calling in visualforce page
<apex:page controller="register" showHeader="false" standardStylesheets="false">
<apex:form id="form" >
<br/><br/><br/><br/>
<div class="details" align="center" >
<div class="firstname">
<apex:image value="{!$Resource.firstname}" width="20" height="15" style="margin-top:0px;"/></div>
<div class="group">
<span style="color: red;font-size: 14px;" >
<apex:inputtext value="{!firstname}" id="fn" html-placeholder="Firstname" styleclass="input"/></span>
<div id="err1" class="error"></div></div>
<div class="lastname">
<apex:image value="{!$Resource.lastname}" width="20" height="15" style="margin-top:0px;"/></div>
<div class="group">
<span style="color: red;font-size: 14px;" >
<apex:inputtext value="{!lastname}" id="ln" html-placeholder="Lastname" styleclass="input"/></span>
<div id="err2" class="error"></div></div>
<div class="password">
<apex:image value="{!$Resource.password}" width="20" height="15" style="margin-top:0px;"/></div>
<div class="group">
<span style="color: red;font-size: 14px;" >
<apex:inputsecret value="{!password}" id="pw" html-placeholder="Password" styleclass="input" /></span>
<div id="err3" class="error"></div></div>
<div class="username">
<apex:image value="{!$Resource.username}" width="30" height="20" style="margin-top:0px;"/></div>
<div class="group">
<span style="color: red;font-size: 14px;" >
<apex:inputtext value="{!username}" id="un" html-placeholder="Username" styleclass="input" /></span>
<div id="err4" class="error"></div></div>
<div align="left" style="margin-left:20px;">
<apex:image value="{!$Resource.dateofbirth}" width="30" height="20" style="margin-top:0px;"/>
</div>
<span style="color: red;font-size: 14px;">
<apex:actionRegion >
<apex:inputtext value="{!dat}" id="db" html-placeholder="dd/mm/yyyy" styleclass="input">
<apex:actionSupport event="onblur" reRender="ag" action="{!find}"/>
</apex:inputtext>
</apex:actionRegion>
</span>
<div id="err5" class="error"></div>
<div align="left" style="margin-left:20px;">
<apex:image value="{!$Resource.Age}" width="30" height="25" style="margin-top:0px;margin-left:0px;"/></div>
<span style="color: red;font-size: 14px;" >
<apex:inputtext value="{!age}" id="ag" html-placeholder="Age" styleclass="input" /></span><br/>
<apex:commandbutton action="{!post}" value="submit" onclick="valdation()" id="demo" onmouseover="tooltip.pop(this, 'Lorem ipsum dolor...mauris')" reRender="error" styleclass="input" style="background:blue; color:white;"/>
</apex:form>
</apex:page>
all css styles working in page but background image not displaying please help me why image not displaying in page
hi i did same way what you exaplained but i am not getting image in page

