I've got a bit of a question regarding the <col> tag and how it takes style attributes in Firefox and Internet Explorer. Here's my code:
/*
* This is the global style sheet for Humbug's test site. Every page will link to it.
* Copyright Ben Ritter 2008
*/
html, body{min-height:100%}
div{
min-height:100%;
/*for testing purposes */
border-style: solid;
border-width: 1px
}
div.pageWrapper{
border-color: green;
border-width: 2;
min-height: 100%
}
div.nav {
float: left;
border-style:solid;
border-width: 1px;
border-color: red;
padding: 0px 5px 0px 8px
}
ul.nav{
list-style-type: none;
padding: 0
}
div.content{
padding: 5px
}
.formLabel {}
.formInput {color:red} /*for the "*" denoting required fields*/
.formDescription {color:#505050}
.error {
color:red;
font-weight: bold
}
/* Below here is for fixing floats that protrude from their container */
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
And html:
<div class="content">
<table class="form">
<colgroup span="3">
<col class="formLabel"></col>
<col class="formInput"></col>
<col class="formDescription"></col>
</colgroup>
<form action="signup.php?a=do" method="post" class="signup">
<tr>
<td colspan="2" style="text-align:center; color:black">* denotes required fields.</td>
<td>Restrictions</td>
</tr>
<tr>
<td>Username:</td>
<td><input type="text" name="username" value="" />*</td>
<td>Length: 3-12 Characters: alpha-numerical and _.</td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password1" value="" />*</td>
<td>Length: 3-15 Characters: alpha-numeral, !@#$%^&*_+-=.,/?_ and spaces.</td>
</tr>
<!-- etc. etc. -->
<tr>
<td> </td>
<td><input type="submit" name="submit" value="Submit" /></td>
<td>All done?</td>
</tr>
</form>
</table>
</div>
Now here's my problem; In Firefox the css class "formInput", "formLabel" and "formDescription" don't have an effect on the text in their respective columns but in IE they do. The only style that I could get to show any effect in FF was width=Xpx
.
It'd be great if there was a way to get this to work so that I don't need to place class=""
attributes inside every <td>
.
PS Firefox 3.0.3 and IE 7.0.6
EDIT: oh, and if you feel so inclined, here's a link.