This renders a lovely white-bordered yellow block in Firefox. How come IE is stumbling on this?
[code]
<body style=”background-color:gray;”>
<table cellspacing=”0″ cellpadding=”0″ border=”0″ style=”margin:0;padding:0;width:17px;height:1px;”>
<tr><td><div style=”width:1px;height:1px;”></div></td><td><div style=”width:15px;height:1px;background-color:white;”></div></td><td><div style=”width:1px;height:1px;”></div></td></tr>
</table>
<table cellspacing=”0″ cellpadding=”0″ border=”0″ style=”margin:0;padding:0;width:17px;height:1px;”>
<tr><td><div style=”width:2px;height:1px;background-color:white;”></div></td><td><div style=”width:13px;height:1px;background-color:white;”><div style=”position:absolute;filter:alpha(opacity=50);opacity:0.50;-moz-opacity:.50;-khtml-opacity:50;background-color:yellow;height:1px;width:13px;”></div></div></td><td><div style=”width:2px;height:1px;background-color:white”></div></td></tr>
<table cellspacing=”0″ cellpadding=”0″ border=”0″ style=”margin:0;padding:0;width:17px;height:12px;”>
<tr><td><div style=”width:1px;height:12px;background-color:white;”></div></td><td><div style=”width:1px;height:12px;background-color:white;”><div style=”width:1px;height:12px;background-color:yellow;filter:alpha(opacity=35);opacity:0.35;-moz-opacity:.35;-khtml-opacity:35;position:absolute;”></div></div></td><td><div style=”width:13px;height:12px;background-color:yellow;”></div></td><td><div style=”width:1px;height:12px;background-color:white”><div style=”width:1px;height:12px;background-color:yellow;position:absolute;filter:alpha(opacity=40);opacity:0.40;-moz-opacity:.40;-khtml-opacity:40;”></div></div></td><td><div style=”width:1px;height:12px;background-color:white;”></div></td></tr>
</table>
<table cellspacing=”0″ cellpadding=”0″ border=”0″ style=”margin:0;padding:0;width:17px;height:1px;”>
<tr><td><div style=”width:2px;height:1px;background-color:white;”></div></td><td><div style=”width:13px;height:1px;background-color:white;”><div style=”width:13px;height:1px;background-color:yellow;filter:alpha(opacity=80);opacity:0.80;-moz-opacity:.80;-khtml-opacity:80;position:absolute;”></div></div></td><td><div style=”width:2px;height:1px;background-color:white”></div></td></tr>
</table>
<table cellspacing=”0″ cellpadding=”0″ border=”0″ style=”margin:0;padding:0;width:17px;height:1px;”>
<tr><td><div style=”width:1px;height:1px;”></div></td><td><div style=”width:15px;height:1px;background-color:white;”></div></td><td><div style=”width:1px;height:1px;”></div></td></tr>
</table>
</body>
The reason I’m not using an image is because all instances of “yellow” will be changed dynamically with JavaScript upon a user-triggered event (whatever color the user picks). The reason I’m using opacity is to have a color between “white” and “yellow”, or whatever color the user picks, without having to do any math.
Any better ways to do this?