I found some code on codingforum.com which formats forms with CSS. However, when I tried it, it does not display the labels on Netscape 7.0 (WinXP). It only shows the input fields. Can anyone tell me what is wrong with it?
[code=php]
<?xml version=”1.0″ encoding=”iso-8859-1″?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”fr”>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=iso-8859-1″ />
<title>Form + Label</title>
<style type=”text/css” media=”screen”>
label,input {
display: block;
width: 150px;
float: left;
margin-bottom: 10px;
}
label {
text-align: right;
width: 75px;
padding-right: 20px;
}
br
{
clear: left;
}
</style>
</head>
<body>
<form id=”MainForm”>
<label for=”name”>Name</label>
<input id=”name” /><br />
<label for=”address”>Address</label>
<input id=”address” /><br />
<label for=”city”>City</label>
<input id=”city” /><br />
</form>
</body>
</html>