473,503 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>
Jul 15 '08 #1
1 4444
In article
<76**********************************@i76g2000hsf. googlegroups.com>,
Gary <gn****@gmail.comwrote:
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
Jul 15 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
5796
by: Mohammd M. Hussain | last post by:
Hi, I am writing an XHTML 1.0 Strict Compatible web page. However, the validator complained about the <br> tag. I wonder whether there is another alternative for this. Thanks,
7
3953
by: Cool Guy | last post by:
My page has a table which sits directly underneath an image. The background colour of the table matches that of the image, so they visually combine. Now, when I view the page in Firefox with...
10
3088
by: Mark McLellan | last post by:
Dear all Following the oft-repeated advice here and ciwas I have made my site nearly 4.01 strict (working on it). There are some items on which I would appreciate your advice: 1. Hidden...
21
2856
by: BT | last post by:
I inherited a simple page that needs to be Strict HTML and I'm not very familiar with this standard. What I'm trying to do _should be_ pretty simple so I hope someone can point me in the right...
16
7533
by: Peter Maas | last post by:
The XHTML file below creates a 2x2 matrix of square images. There is always some space at the bottom borders of the cells (when rendered with Gecko and KHTML, not with IE) and I've found no way so...
1
6798
by: Andy Crawford | last post by:
Even though I have set Strict Off, it is still on, thus causing this error. Here is the code in a templated Column of a DataGrid: (XPpro, Framework 1.1) <ItemTemplate> <TABLE width="100%">...
1
1926
by: Shadow Lynx | last post by:
Consider this simple HTML: <!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>...
5
1568
Kelicula
by: Kelicula | last post by:
Ok, as some of you may know I have been working on this survey for the last couple weeks. I was strongly encouraged to include the strict pragma in my scripts. Well I have created a short...
92
5060
by: Erwin Moller | last post by:
Hi group, I encoutered page validation error, but I don't know a way around. The page has the following doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.