Forum Moderators: not2easy
<!DOCTYPE HTML> will make it work magically. However, I cannot change the doctype as I don't have control over it.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Quirks Test</title>
<style>
.LabelColBill {
color: blue;
}
/* label embedded in table w/o css id or class to select */
.DataColBill td[align=right] {
color: blue;
}
</style>
</HEAD>
<BODY>
<div id="divPageOuter" class="PageOuter">
<div id="divPage" class="Page">
<form id="formPayment">
<div id="divBillingInformation">
<TABLE id="tableCustomerBillingInformation">
<tr>
<td class="LabelColBill">First Name: </td>
<td class="DataColBill">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><!--x_first_name.val-->Foo<!--end--></td>
<td align="right"> Last Name: </td>
<td><!--x_last_name.val-->Bar<!--end--></td>
</tr>
</table>
</td>
</tr>
</TABLE> <!-- tableCustomerBilling -->
</div> <!-- divBillingInformation -->
</div> <!-- entire BODY -->
</div>
</BODY>
</HTML>
<head></head> tags. <a href="javascript:back()">. Perhaps there is a workaround using this approach. I'm afraid of how ugly it will be, but at this point, I'll take whatever I can get.
.LabelColBill {
color: blue;
}
/* label embedded in table w/o css id or class to select */
.DataColBill td[align=right] {
color: blue;
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Quirks Test</title>
</HEAD>
<BODY>
<div id="divPageOuter" class="PageOuter">
<div id="divPage" class="Page">
<div id="divMerchantHeader" class="HeaderFooter1">
<!--
I can embed code here, like the following.
Not a nice place to ref a stylesheet, but what the hey, its my only option and it works.
-->
<link rel="stylesheet" type="text/css" href="http://example.com/pretty.css">
<a href="javascript:back()">Go Back</a>
</div>
<form id="formPayment">
<div id="divBillingInformation">
<TABLE id="tableCustomerBillingInformation">
<tr>
<td class="LabelColBill">First Name: </td>
<td class="DataColBill">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><!--x_first_name.val-->Foo<!--end--></td>
<td align="right"> Last Name: </td>
<td><!--x_last_name.val-->Bar<!--end--></td>
</tr>
</table>
</td>
</tr>
</TABLE> <!-- tableCustomerBilling -->
</div> <!-- divBillingInformation -->
<div id="divMerchantFooter" class="HeaderFooter1">
<!-- I can embed code here as well -->
</div>
</div> <!-- entire BODY -->
</div>
</BODY>
</HTML>
.DataColBill td { /* IE only */
behavior: expression(
this.className = 'td' + cellIndex,
this.style.behavior = null
);
}
.DataColBill .td1 {color: blue;}
<TD class=DataColBill><TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD style="BEHAVIOR: null" class=td0><!--x_first_name.val-->Foo<!--end--></TD>
<TD style="BEHAVIOR: null" class=td1 align=right> Last Name: </TD>
<TD style="BEHAVIOR: null" class=td2><!--x_last_name.val-->Bar<!--end--></TD></TR></TBODY></TABLE></TD>
this.className += ' td' + cellIndex, - the null style is to stop the behavior repeatedly calling
It doesn't interfere with Firefox or Chrome which use the attribute selector just fine, so no need for conditional commentsOther user agents read and try to process the rule. It is not valid so triggers error handling. That may not cause a noticeable problem, but the issue is completely avoided by using a conditional comment.
don't make a habit of recommending IE expressions... nor sending styles from a div in the body. ;)