Click here to Skip to main content
15,569,696 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i create a div in asp.net..in that div,3 sub divs are there..1st one is header div,2nd one is content div in whict again 2 subdivs are there..3rd one is footer div...i have done the following coding..
XML
<body>
 <form id="form1" runat="server">
    <div class="container">
           <div  class="header">
           <h1 style="text-align:center; font-style:italic">WELCOME TO THE WORLD OF WEBSITE</h1>
           </div>
           <div class="menu">

                 <asp:Menu ID="headermenu" runat="server" BackColor="#CC0099" ForeColor="#333399"
                     Orientation="Horizontal" EnableTheming="True" IncludeStyleBlock="true"
                     ClientIDMode="Static" ViewStateMode="Enabled" Height="30px">
                     <Items>
                     <asp:MenuItem NavigateUrl="" Text="HOME">
                     </asp:MenuItem>
                     <asp:MenuItem NavigateUrl="" Text="ABOUT US" />
                     <asp:MenuItem NavigateUrl="" Text="CONTACT US" />
                     </Items>
                 </asp:Menu>
           </div>
           <div class="content">
                 <div class="content1">
                     <table>
                     <tr>
                     <td>NAME</td>
                     <td style="float:right"><asp:TextBox ID="nametxt" runat="server" /></td>
                     </tr>
                     <tr>
                     <td>AGE</td>
                     <td style="float:right"><asp:TextBox ID="agetxt" runat="server" /></td>
                     </tr>
                     <tr>
                     <td>ADDRESS</td>
                     <td style="float:right; display:block"><asp:TextBox ID="addresstxt" runat="server"
                             TextMode="MultiLine"></asp:TextBox></td>
                     </tr>
                     </table>
                 </div>
                 <div class="content2">
                     USER NAME:
                     <asp:TextBox ID="usernametxt" runat="server" />
                     <br /><br /><br /><br />
                     PASSWORD:
                     <asp:TextBox ID="passwordtxt" runat="server" TextMode="Password" />
                     <br /><br /><br /><br />
                     <asp:Button ID="loginbtn" runat="server" Text="LOGIN" Width="100px" />
                 </div>
            </div>
      </div>
           <div class="footer" style="background-color:Silver; text-align:center; clear:both ; height:50px"><br />Copyright@footer.com
           </div>


  </form>
</body>


and in stylesheet form the following coding is done..
CSS
body
{
    background-color:ActiveCaption;
}

.header
{
    background-image:url("images/thCAUUWRRV.jpg");
    height:100px;


}
.menu
{
   height:50px;
   width:1000px;
}
.container
{

    border:2px solid black;
    border-style:double;
    margin-left:50px;
    margin-bottom:50px;
     margin-right:50px;
     margin-top:auto;

}
.content1
{

  float :left ;
  height:400px;
  width:600px;
  text-align:center;
  background-image:url("images/609094[1].jpg");

}
.content2
{
    background-image:url("images/599999[1].jpg");

    float:right;
    height:400px;
    width:600px;

    }

now the problem is that the background images are showing on the form but not displaying during run time..
please sort out the problem...
Posted
Updated 7-Jul-13 21:57pm
v4
Comments
AlphaDeltaTheta 8-Jul-13 3:01am    
See if image is accessible. Load it in firefox and open web console. See if any error is reported
VICK 8-Jul-13 3:09am    
I am unable to find any Image Tag in the above posted code... where you have placed your images??

try this...:)

CSS
.header
{
    background-image:url('images/thCAUUWRRV.jpg');
    height:100px;
 

}
.content1
{
 
  float :left ;
  height:400px;
  width:600px;
  text-align:center;
  background-image:url('images/609094[1].jpg');
 
}
.content2
{
    background-image:url('images/599999[1].jpg');
 
    float:right;
    height:400px;
    width:600px;
 
    }


and be sure with Image URL.
 
Share this answer
 
v2
make sure you are connected to internet because sometimes if you are not connected to net it causes problem.
Check your URL properly
 
Share this answer
 
Comments
shipra goyal 8-Jul-13 3:16am    
ya..i was not connected to the net and dats why the problem arises..thanks a lot...
Rajan Maheshwari 8-Jul-13 3:17am    
koi baat ni..mere saath bhi hua tha aisa...:) Gud luck
Rajan Maheshwari 8-Jul-13 3:18am    
ATleast soln ko 3 star to dedo

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900