Hi
I'm new to css and I'm trying to write a tabel-less form which has sort of worked but the layout isn't right.
we have a seperate file for css files and for asp files.
below is part of the asp file and further below some of the styles from the css file I have been using. Problem is the labels aren't wide enough ? how can i make them wider following the principles I've used below. Also I need it to be as fully as accessible as possible.
any help appreciated
thanks
jack
b = b & "<form action=""mysite.asp?page=1344"" method=""post"" name=""formFOI"">"
b = b & "<div class=""form"">"
b = b & "<label for=""Name"">Name (*)</label><input type=""text"" name=""Name"" size=""30"" value=""" & TheName & """ /><br />"
b = b & "<label class=""label-rich"" for=""Organisation"">Organisation</label><input type=""text"" name=""organisation""
size=""30"" value=""" & organisation & """ /><br />"
................and so on ending with
b = b & "<div class=""form_group"">"
b = b & "<input type=""submit"" value=""Submit"" class=""submit-button"" /><input type=""reset"" value=""Clear Form"" />"
b = b & "</div>"
b = b & "</div>"
b = b & "</form>"
css file
---------
.form label, .form input, .form textarea, .form select, .form .form_text {
display:block;
float:left;
margin-bottom:10px;
}
.form .form_group select, .form .form_group .form_text, .form .form_group input {
margin-right:5px;
}
.form label {
text-align:left;
width:100px;
margin-right:75px;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
.form br {
clear:both;
}
.label-rich {
float: left;
width: 150px;
text-align: right;
}
.input-box
{
margin-bottom: 10px
}
.submit-button
{
margin-left: 0em;
clear: both
}
I'm new to css and I'm trying to write a tabel-less form which has sort of worked but the layout isn't right.
we have a seperate file for css files and for asp files.
below is part of the asp file and further below some of the styles from the css file I have been using. Problem is the labels aren't wide enough ? how can i make them wider following the principles I've used below. Also I need it to be as fully as accessible as possible.
any help appreciated
thanks
jack
b = b & "<form action=""mysite.asp?page=1344"" method=""post"" name=""formFOI"">"
b = b & "<div class=""form"">"
b = b & "<label for=""Name"">Name (*)</label><input type=""text"" name=""Name"" size=""30"" value=""" & TheName & """ /><br />"
b = b & "<label class=""label-rich"" for=""Organisation"">Organisation</label><input type=""text"" name=""organisation""
size=""30"" value=""" & organisation & """ /><br />"
................and so on ending with
b = b & "<div class=""form_group"">"
b = b & "<input type=""submit"" value=""Submit"" class=""submit-button"" /><input type=""reset"" value=""Clear Form"" />"
b = b & "</div>"
b = b & "</div>"
b = b & "</form>"
css file
---------
.form label, .form input, .form textarea, .form select, .form .form_text {
display:block;
float:left;
margin-bottom:10px;
}
.form .form_group select, .form .form_group .form_text, .form .form_group input {
margin-right:5px;
}
.form label {
text-align:left;
width:100px;
margin-right:75px;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
.form br {
clear:both;
}
.label-rich {
float: left;
width: 150px;
text-align: right;
}
.input-box
{
margin-bottom: 10px
}
.submit-button
{
margin-left: 0em;
clear: both
}