Connecting Tech Pros Worldwide Help | Site Map

IE 7 - strict - table bug

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 15th, 2008, 12:05 AM
Gary
Guest
 
Posts: n/a
Default IE 7 - strict - table bug

Hello folks,
I have a simple bug that defies my ability to find a work around. In
IE7 strict-mode, if you have a table with width 100% in a DIV block..
the content will appear UNDER the div's scrollbar. If you switch to
quirks-mode the problem goes away - meaning the table width adjusts to
accomodate the scrollbar.
To see, display the follow html and click "add text" until you get a
scrollbar. Some text will appear under the scrollbar. Remove the
doctype tag, and reload, to go into quirks-mode, and the problem is
not reproducable.
Anyone know what is going on, or have a work around?
Thank you!
Gary




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html lang="en"
xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>

<style>
#box { border:1px solid #000; height:70px; width:50%; overflow:auto;
overflow-x:hidden }
#text1 { background:#fff; }
#text2 { background:#fcc; }
</style>

<script>
function addText(){
var el = document.getElementById("text2");
el.innerHTML += "a ab a abc a abcd a abcde";
}
</script>


</head>
<body>

<div id=box>
<table width=100%>
<tr><td width=50%>
<div id=text1>test test</div>
</td>
<td>
<div id=text2>test test</div>
</td></tr>
</table>
</div>

<a href="#" onclick="addText(); return false;">add text</a>


</body>
</html>

  #2  
Old July 15th, 2008, 02:45 AM
dorayme
Guest
 
Posts: n/a
Default Re: IE 7 - strict - table bug

In article
<7616e128-459f-400f-b8a1-6457280918c1@i76g2000hsf.googlegroups.com>,
Gary <gneier@gmail.comwrote:
Quote:
Hello folks,
I have a simple bug that defies my ability to find a work around. In
IE7 strict-mode, if you have a table with width 100% in a DIV block..
the content will appear UNDER the div's scrollbar. If you switch to
quirks-mode the problem goes away - meaning the table width adjusts to
accomodate the scrollbar.
To see, display the follow html and click "add text" until you get a
scrollbar. Some text will appear under the scrollbar. Remove the
doctype tag, and reload, to go into quirks-mode, and the problem is
not reproducable.
Anyone know what is going on, or have a work around?
Thank you!
Gary
>
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html lang="en"
xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
>
<style>
#box { border:1px solid #000; height:70px; width:50%; overflow:auto;

As far as I see there is a clash between your specification of width of
100% and your wish to clear the scrollbar. This happens in many
browsers, try adding width: 100%; to the P in:

<http://dorayme.890m.com/alt/scrollBoxTest.html>

I have tested in IE 6 and it behaves as with FF and Safari with and
without the width. With the width at 100%, it grabs the whole width of
the div box, the scroll bars grab a set piece of space *on top"

--
dorayme
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.