Windows Vista Tips

Windows Vista Tips > Newsgroups > Internet Explorer > Problem with bounding rect height in IE8 with transitional doctype

Reply
Thread Tools Display Modes

Problem with bounding rect height in IE8 with transitional doctype

 
 
maroy
Guest
Posts: n/a

 
      12-18-2009
I ran across this problem in IE8 and think it is a bug. Load the following
html and click the button. The bounding rectangle is 0 pixels high. If I
remove the doctype it works OK. It also seems to work OK without the strong
tag. The same issue is apparent viewing the layout box in the developer tools.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Test</title>
<script type="text/javascript">
function onClick() {
var rct = document.getElementById("test").getBoundingClientR ect();
alert( "L:" + rct.left + ", " +
"T:" + rct.top + ", " +
"R:" + rct.right + ", " +
"B:" + rct.bottom
);
}
</script>
</head>
<body>
<a id="test" href="#"><strong>Test</strong></a><br>
<button onclick="onClick()">Click Me!</buton>
</body>
</html>

 
Reply With Quote
 
 
 
 
maroy
Guest
Posts: n/a

 
      12-18-2009
Running WinXP SP2
 
Reply With Quote
 
C A Upsdell
Guest
Posts: n/a

 
      12-18-2009
maroy wrote:
> I ran across this problem in IE8 and think it is a bug. Load the following
> html and click the button. The bounding rectangle is 0 pixels high. If I
> remove the doctype it works OK. It also seems to work OK without the strong
> tag. The same issue is apparent viewing the layout box in the developer tools.
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html>
> <head>
> <title>Test</title>
> <script type="text/javascript">
> function onClick() {
> var rct = document.getElementById("test").getBoundingClientR ect();
> alert( "L:" + rct.left + ", " +
> "T:" + rct.top + ", " +
> "R:" + rct.right + ", " +
> "B:" + rct.bottom
> );
> }
> </script>
> </head>
> <body>
> <a id="test" href="#"><strong>Test</strong></a><br>
> <button onclick="onClick()">Click Me!</buton>
> </body>
> </html>
>


Run it through the validators. There is at least one significant HTML
error.

BTW, when something works with IE only in Quirks mode, it is a strong
hint that your code is broken or that your understanding of the
standards is broken.

 
Reply With Quote
 
maroy
Guest
Posts: n/a

 
      01-05-2010
"C A Upsdell" <""cupsdell"@nospam@upsdel" wrote:
>
> Run it through the validators. There is at least one significant HTML
> error.
>
> BTW, when something works with IE only in Quirks mode, it is a strong
> hint that your code is broken or that your understanding of the
> standards is broken.
>
> .


Thanks, but fixing the errors did not resolve the issue:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
<script type="text/javascript">
function onClick() {
var rct = document.getElementById("test").getBoundingClientR ect();
alert( "L:" + rct.left + ", " +
"T:" + rct.top + ", " +
"R:" + rct.right + ", " +
"B:" + rct.bottom
);
}
</script>
</head>
<body>
<a id="test" href="#"><strong>Test</strong></a><br />
<button onclick="onClick()">Click Me!</button>
</body>
</html>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Caps Lock / Bloc Num problem stewiggle Windows Vista Hardware 12 01-18-2008 10:24 PM
trouble with new ram Computer & Sound System Tech Windows Vista Hardware 43 11-12-2007 10:57 AM
A problem with your video hardware caused Windows to stop working correctly. Rookie27 Windows Vista Hardware 20 09-03-2007 07:51 AM
Error reports what do they mean Joe83 Windows Vista Hardware 1 06-07-2007 03:35 AM
Problem Code 39 (already deleted the filters) JayFrindt Windows Vista Hardware 4 06-19-2006 12:46 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59