Karl Seguin said:
There's nothing wrong with what you are doing. you can either use class
or
CssClass (class isn't a recognize proprety so it simply gets rendered
as-is
as an html attribute). Probably better to use cssClass so you can program
against it easier..but that isn't your issue.
I've experienced extremely finiky behaviour from firefox with respect to
applying styles to textboxes...simple things like extra spaces causing
problems...I imagine you are running into the same problem (and I imagine
it
isn't with firefox but something we are doing). Simply try rewriting
the
style as:
.table2Label{border-style:none;background-color:#F6F6F6;}
and make sure nothing is indented ...
Nope.
I also tried IE and Netscape and they don't work either.
Does this statement look right?
<asp:textbox id="applicantID" Class="textbox2Label"
TextMode="SingleLine" Columns="32" runat="server" />
Here is the CSS file from the beginning to just after the text2label class.
***********************************************
body {
margin:0;
padding:0;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
th {
background-color:#2FABAD;
color:white;
text-decoration: none;
border-style:none;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
..dataGrid {
background-color:#2FABAD;
color:white;
border-style:none;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
..dataGrid a:visited {color:#FFFFFF;font-weight:bold;
}
..dataGrid a:link {color:#FFFFFF;font-weight:bold;
}
..dataGrid a:active {color:#FFFFFF;font-weight:bold;
}
..table2Label{border-style:none;background-color:#F6F6F6;}
..console{
background-color:#2FABAD;
color:white;
text-decoration: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:12;
}
*******************************************************
Here it is rendered in IE (looks right)
*********************************************************************
<tr valign="baseline">
<td width="160" align="right" nowrap class="BodyText">Applicant
ID:</td>
<td >
<input name="applicantID" type="text" value="1000" size="32"
readonly="readonly" id="applicantID" Class="textbox2Label" />
</td>
</tr>
****************************************************************************
Here it is in Mozilla (also appears correct):
***************************************************************************
<tr valign="baseline">
<td width="160" align="right" nowrap class="BodyText">Applicant
ID:</td>
<td >
<input name="applicantID" type="text" value="1000" size="32"
readonly="readonly" id="applicantID" Class="textbox2Label" />
</td>
</tr>
****************************************************************************
This is what drives me crazy. I spend hours or days trying to get something
to work that should work. I have spent the whole day on this and can't seem
to get it to work.
I think I am just going to create an identical page and change all the
textboxes to labels as I can't spend too much more time on this.
Thanks,
Tom