Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is my asp page

ASP.NET
%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="SignUp.aspx.cs" Inherits="About" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<!--Content Section -->
<div align="center" class="signup_form_heading">
<h1>Login to Vid Stream</h1>
<p>Lorem Ipsum is simply dummy text of the printing and
typesetting industry.</p>
</div>
<form action="#">
<div align="center" class="signup-form">
<ul>
<li><label>Name:</label><span><input type="text" value="Name" class="txt-field"  onfocus="if(this.value == 'Name') { this.value = ''; }"  önblur="if(this.value == '') { this.value = 'Name'; }" /></span></li>
<li><label>Email:</label><span><input type="text" value="User Name" class="txt-field"  onfocus="if(this.value == 'User Name') { this.value = ''; }"  önblur="if(this.value == '') { this.value = 'User Name'; }" /></span></li>
<li><label>Password:</label><span><input type="password" value="password" class="password" onfocus="if(this.value == 'password') { this.value = ''; }"  önblur="if(this.value == '') { this.value = 'password'; }" /></span></li>
<li><label>Password:</label><span><input type="password" value="password" class="password" onfocus="if(this.value == 'password') { this.value = ''; }"  önblur="if(this.value == '') { this.value = 'password'; }" /></span></li>
<li><div><input type="submit" value="Sign Up" class="signup-btn" /></div></li>
</ul>
</div>
</form>
<br class="clear" />
<!--Content Section End -->


this is my css file

CSS
.signup_form_heading {
width:297px;
float:left;
background:url(../images/db-border.gif) repeat-x bottom;
padding-bottom:6px;
margin-bottom:20px;
}
.signup_form_heading h1 {
height:46px;
background:url(../images/login-heading.png) no-repeat left top;
text-indent:-9999px;
margin-bottom:8px;
}
.signup_form_heading p {
line-height:18px;
padding-bottom:12px;
font-family:Arial, Helvetica, sans-serif;
color:#00555a;
}
.signup-form
{
float:none;
width:297px;
padding-top:5px;
}
.signup-form li{
float:left;
width:297px;
padding-bottom:13px;
}
.signup-form li label {
display:block;
float:left;
width:81px;
font-weight:bold;
font-size:12px;
color:#00555a;
font-family:Arial, Helvetica, sans-serif;
line-height:27px;
}
.signup-form li span {
display:block;
float:left;
width:211px;
height:27px;
background:url(../images/bg-input-usr.png) no-repeat left top;
}
.signup-form li span input {
float:left;
width:191px;
height:15px;
font-size:11px;
color:#787979;
border:none;
font-family:Arial, Helvetica, sans-serif;
background:none;
padding:6px 10px;
}
.signup-form li span input.password {
font-size:18px;
}
.signup-form li div {
float:left;
padding-left:81px;
width:211px;
padding-top:5px;
padding-bottom:2px;
}
.signup-form li div label {
font-weight:normal;
width:auto;
font-size:11px;
line-height:15px;
color:#6f6f6f;
width:120px;
}
.signup-form li div label input {
float:left;
margin-right:6px;
width:15px;
height:15px;
line-height:0;
font-size:0;
}
.signup-form li div a {
float:right;
display:block;
width:90px;
text-align:right;
}
.signup-form li div input.login-btn {
float:left;
width:87px;
height:29px;
background:url(../images/btn-login.gif) no-repeat left top;
border:none;
text-indent:-9999px;
line-height:0;
font-size:0;
cursor:pointer;
}

i cant get the styles to my form. what should i do??
Posted

Did you link the css file to your page?
 
Share this answer
 
Comments
phantomlakshan 9-Aug-11 5:16am    
yes i did. i added that to the master page. can u think of a reason why is this not working??
arathi_suresh 9-Aug-11 5:20am    
Try providing .signup-form ul li instead of .signup-form li in your css file
Here in the asp page no where you are giving the link of stylesheet file.
To add your CSS file open your asp page in design mode then drag and drop your stylesheet file from solution explorer to the asp page.

Hope this will help you
 
Share this answer
 
Comments
phantomlakshan 9-Aug-11 5:26am    
i added it to the master page and all the other styles are working but this one
You need to write below line between <head></head>
<link href="yourcssfile.css" rel="stylesheet" type="text/css" />

that will aplay to partuclar page level
take a look at this-[Applying CSS to Asp.net Application][^] article which will help you to learn how to use CSS.
 
Share this answer
 

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