Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have downloaded a number of CSS Sheets for formatting forms. But none of them is doing anything. HTML tags like fieldset seem to be doing fine. Please note that I am working on NetBeans 7.0.

Following is the basic CSS that I have tried but it has not worked. There are other CSS sheets also not working if you want for reference.

body{
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
}
p, h1, form, button{border:0; margin:0; padding:0;}
.spacer{clear:both; height:1px;}
/* ----------- My Form ----------- */
.myform{
margin:0 auto;
width:400px;
padding:14px;
}

/* ----------- stylized ----------- */
#stylized{
border:solid 2px #b7ddf2;
background:#ebf4fb;
}
#stylized h1 {
font-size:14px;
font-weight:bold;
margin-bottom:8px;
}
#stylized p{
font-size:11px;
color:#666666;
margin-bottom:20px;
border-bottom:solid 1px #b7ddf2;
padding-bottom:10px;
}
#stylized label{
display:block;
font-weight:bold;
text-align:right;
width:140px;
float:left;
}
#stylized .small{
color:#666666;
display:block;
font-size:11px;
font-weight:normal;
text-align:right;
width:140px;
}
#stylized input{
float:left;
font-size:12px;
padding:4px 2px;
border:solid 1px #aacfe4;
width:200px;
margin:2px 0 20px 10px;
}
#stylized button{
clear:both;
margin-left:150px;
width:125px;
height:31px;
background:#666666 url(img/button.png) no-repeat;
text-align:center;
line-height:31px;
color:#FFFFFF;
font-size:11px;
font-weight:bold;
}


Here is the HTML code for the forms I am trying with this CSS.

<html>
    
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>List Itinerary</title>
        <meta name="keywords" content="itinerary, list" />
        <meta name="description" content="This page provides a list of all itineraries" />
        <link href="css/exmp.css" rel="stylesheet" type="text/css" />
    </head>
    <body>    
<div id="stylized" class="myform">
<form id="form" name="form" method="post" action="index.html">
<h1>Sign-up form</h1>
<p>This is the basic look of my form without table</p>

<label>Name
Add your name
</label>
<input type="text" name="name" id="name" />

<label>Email
Add a valid address
</label>
<input type="text" name="email" id="email" />

<label>Password
Min. size 6 chars
</label>
<input type="text" name="password" id="password" />

<button type="submit">Sign-up</button>
<div class="spacer"></div>

</form>
</div>
    
    </body>
    
</html>
Posted
Comments
thatraja 31-May-11 21:59pm    
Not Working means what? include the screenshot in your question. It would be easy to understand.
R. Giskard Reventlov 1-Jun-11 4:52am    
Can't see much wrong but try placing the form outside the div.

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

  Print Answers RSS


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