<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html>
<head>
 <title>Percentage width of absolute-positioned replaced elements</title>
  <style type="text/css">
   .box img {
   height: 100%;
   left: 0px;
   position: absolute;
   top: 0px;
   width: 100%;
   z-index: 0;
   }
   .box {
   background-color: red;
   border: solid black 2px;
   position: relative;
   padding: 5px;
   width: 300px;
   }
   .box * {
   position: relative;
   text-align: center;
   z-index: 1;
   }
   </style>
   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property" title="10.2 Content width: the 'width' property - <percentage> value">
</head>
<body>
<div class="box">
  <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABVJREFUeNpiZPjPgAyYGBgo4gMEGABPkgEJUvO9mgAAAABJRU5ErkJggg==">
  <p>There should be no red on this page</p>
</div>
</body>
</html>