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" xml:
lang=
"fr" lang=
"fr">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
5 <title>height claculation bug in nested absolute positioned elements
</title>
6 <style type=
"text/css">
7 html
, body
{ margin:0;}
8 div
{ position:absolute
; border: 1px solid gray
; margin:0; }
12 <!-- <div style="top: 100px; height:80%; left: 50px; width:80% "> this setting gives correct calculation -->
13 <div style=
"top: 100px; bottom: 100px; left: 50px; right:50px ">
14 <div style=
"top:10%;height:80%; width:80%; border-color: red">
15 <img src=
"resources/icon-gold.png" alt=
"" style=
"height:100%; width:auto;" />
16 <!-- <img src="http://webkit.org/images/icon-gold.png" alt="" style="height:auto; width:100%;" /> this is ok -->