html-attribute-010.xht (1375B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Attribute 'cols' vs CSS 'width' specificity</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" /> 7 <link rel="help" href="http://www.w3.org/TR/css-cascade-3/#preshint" /> 8 <link rel="help" href="http://www.w3.org/TR/css-cascade-4/#preshint" /> 9 <meta name="assert" content="Attribute 'cols' has a specificity of zero and is overridden by CSS." /> 10 <style type="text/css"> 11 html, body, p, br, div 12 { 13 border: none; 14 width: auto; 15 } 16 * 17 { 18 border: 1px solid blue; 19 padding: 0; 20 width: 100px; 21 } 22 div div 23 { 24 background: orange; 25 height: 20px; 26 width: 102px; 27 } 28 </style> 29 </head> 30 <body> 31 <p>Test passes if the width of the blue box is the same as the orange bar below.</p> 32 <div> 33 <textarea cols="500" rows="10"></textarea> 34 <div></div> 35 </div> 36 </body> 37 </html>