Gunnar Bittersmann: Listen element

Beitrag lesen

Hello out there!

aber gab es da nicht eine Situation, in der der IE zusätzlich zu display:block noch width:100% benötigte?

Das ist wohl so eine.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>TEST</title>  
    <style type="text/css">  
[code lang=css]      a {  
        background: #CCF;  
        display: block;  
      }  
      a:hover {  
        background: #66C;  
      }

</style>
  </head>
  <body>
    <ul>
      <li><a href="foo">foo</a></li>
      <li><a href="bar">bar</a></li>
    </ul>
  </body>
</html>[/code]

und es geht auch im IE.

      ul {  
        width: 200px;  
      }

dazu und der von Richard beschriebene Effekt tritt auf.

      a {  
        width: 100%;  
      }

dazu und er ist wieder weg.

See ya up the road,
Gunnar

--
“Remember, in the end, nobody wins unless everybody wins.” (Bruce Springsteen)