spybreak
04-11-2003, 11:06 PM
Hi!
I made a Form and I want it to look like this: click (http://www.spybreak.de/test.html)
This is the code:
<html>
<body>
<style type="text/css">
table { color: #000000; font-family: Verdana; font-size: 10pt; }
</style>
<table width="250">
<tr>
<td width="10"><span style="white-space: nowrap;">Real Name:</span></td>
<td><input name="realName" id="realName" style="width: 100%;"></td>
</tr>
</table>
<table width="250">
<tr>
<td width="10"><span style="white-space: nowrap;">Email:</span></td>
<td><input name="realName" id="realName" style="width: 100%;"></td>
</tr>
</table>
<table width="250">
<tr>
<td width="10"><span style="white-space: nowrap;">Location:</span></td>
<td><input name="realName" id="realName" style="width: 100%;"></td>
</tr>
</table>
</body>
</html>
Now the problem is: Can I do that in pure Css? You see, I need lots of tables to align the form labels and elements the way they are.
I tried it with CSS but it doesnt work: click (http://www.spybreak.de/test2.html)
<html>
<form>
<style>
.myForm {
background: #CCCCCC;
padding: 5px;
width: 400px;
max-width: 300px;
white-space: nowrap;
}
</style>
<span class="myForm">Real Name: <input name="realName" style="width: 100%;"></span><br>
<span class="myForm">email: <input name="email" style="width: 100%;"></span><br>
</form>
</html>
thanks, I appreciate it
- Robert
I made a Form and I want it to look like this: click (http://www.spybreak.de/test.html)
This is the code:
<html>
<body>
<style type="text/css">
table { color: #000000; font-family: Verdana; font-size: 10pt; }
</style>
<table width="250">
<tr>
<td width="10"><span style="white-space: nowrap;">Real Name:</span></td>
<td><input name="realName" id="realName" style="width: 100%;"></td>
</tr>
</table>
<table width="250">
<tr>
<td width="10"><span style="white-space: nowrap;">Email:</span></td>
<td><input name="realName" id="realName" style="width: 100%;"></td>
</tr>
</table>
<table width="250">
<tr>
<td width="10"><span style="white-space: nowrap;">Location:</span></td>
<td><input name="realName" id="realName" style="width: 100%;"></td>
</tr>
</table>
</body>
</html>
Now the problem is: Can I do that in pure Css? You see, I need lots of tables to align the form labels and elements the way they are.
I tried it with CSS but it doesnt work: click (http://www.spybreak.de/test2.html)
<html>
<form>
<style>
.myForm {
background: #CCCCCC;
padding: 5px;
width: 400px;
max-width: 300px;
white-space: nowrap;
}
</style>
<span class="myForm">Real Name: <input name="realName" style="width: 100%;"></span><br>
<span class="myForm">email: <input name="email" style="width: 100%;"></span><br>
</form>
</html>
thanks, I appreciate it
- Robert