ByNary010101
Programmer
No this isn't a homework question, I am trying to make the conversion from desktop development to web development and I'm having a fun time. So anyway, I'm trying to get the layout of my application based mostly on CSS and not tables. A simple scenario would be a login page, I want the UserName and Password fields to be, i don't know, 200 pixels down the page and centered, I tried to use:
but it doesn't work in either IE6 or Firefox...any suggestions? Another question would be how I might be able to do this without the use of the table. Thanks for your help and sorry if this has been covered before
Code:
<style type="text/css">
#login {position:absolute;top:200px}
#login th {text-align:right}
#login td {padding:0.125em}
input {border:1px solid black}
</style>
</head>
<body>
<div id="login" align="center">
<table>
<tr>
<th>Username:</th>
<td>
<input type="text" name="UserName" id="UserName" maxlength="10" />
</td>
</tr>
<tr>
<th>Password:</th>
<td>
<input type="password" name="Password" id="Password" maxlength="10" />
</td>
</tr>
</table>
</div>
</body>
but it doesn't work in either IE6 or Firefox...any suggestions? Another question would be how I might be able to do this without the use of the table. Thanks for your help and sorry if this has been covered before