html - Why is an align attribute propagating from td to a contained table on IE only? -


this html:

<!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <html> <head><title>td align test</title></head> <body> <table width="100%">   <tr><td>aligned left</td><td align="right">aligned right</td></tr>   <tr><td colspan="2" align="center">     <table width="100%" cellspacing="0" cellpadding="0">       <tr><td>should aligned left</td></tr>     </table>   </td></tr> </table> </body> </html> 

aligns "should aligned left" centered in ie (6 & 8) , opera, left in firefox (3.6 & 4 beta) , chromium. former seem propagate alignment td contained table.

can explain difference? , behavior more standards-compliant?

(you can try @ http://ysth.info/tdalign.html.)

you can have @ http://www.docsteve.com/docsteve/technotes/ie6_cascade_test.html why might happening.

the fact is ie glitch (incompatibility other browsers) . thing can suggest override it, explicitly specifying alignment want..

if use classes , text-align:center notice browsers behave ie align attribute, not sure correct/wrong that.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -