472,805 Members | 929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Why does MSIE (but not Mozilla) expand my table beyond its width?

I have a table I hide show/hide through a pair of divs. The show/hide
part works fine in both Mozilla and MSIE. When switching between the
hide and show versions the Mozilla browser keeps them in small width,
about 740 pixels.

When switching between show/hide with MSIE the "show" table wants to
display about 960 pixels. If I set the outer table to '
style="table-layout: fixed;" ' then MSIE chooses to force the width to
960 pixels.

When I remove the ' width="XXX" ' clauses the table displays small, as
with Mozilla. Problem is, I want the columns to squish to the left as
much as possible.

So my question is two sided:
* Can I make MSIE behave with the "width" clauses, so it keeps actual
displayed width at 740?
* Can I make the columns squish to the left (minimize white space
between columns by forcing maximum white space to the right of all of
the columns) through some other means (stylesheet)?

Thanks very much,
Jerome.
What follows is a stripped-down example that does the bad tricks:

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

<HEAD>
<SCRIPT language="javascript">
function minMaxData(min, max) {
document.getElementById(min).style.display = "none";
document.getElementById(max).style.display = "inline";
}

function maxData(max) {
document.getElementById(max).style.display = "inline";
}
</SCRIPT>
</HEAD>

<BODY>
<DIV align="center">
<FORM name="sampleOrderForm" method="post">

<DIV id="infoMin" style="DISPLAY: inline">
<TABLE borderColor="black" width="740" border="1">
<TBODY>
<TR>
<TD align="left" width="20%">&nbsp;</TD>
<TD align="middle" width="60%"><B>ATTACHMENT INFO</B></TD>
<TD align="right" width="20%" nowrap>
click to add attachments -&gt;&nbsp;&nbsp;
<A href="javascript:minMaxData('infoMin',
'infoMax');">[max]</A>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>

<DIV id="infoMax" style="DISPLAY: none">
<TABLE borderColor="black" width="740" border="1">
<TBODY>
<TR>
<TD>

<TABLE width="100%" border="1" bordercolor="black">
<TBODY>
<TR>
<TD align="left" width="20%">&nbsp;</TD>
<TD align="center" width="60%">
<B>ATTACHMENT INFO</B>
</TD>
<TD align="right" width="20%">
<A href="javascript:minMaxData('infoMax',
'infoMin');">[min]</A>
</TD>
</TR>
</TBODY>
</TABLE>

<TABLE width="100%" border="2" bgcolor="#00FF00">
<TBODY>
<TR>
<TD width="2%" bgcolor="#FFFF00">&nbsp;</TD>
<TD width="10%" bgcolor="#FF00FF">&nbsp;Name</TD>
<TD width="10%" bgcolor="#00FFFF">&nbsp;Uploaded</TD>
<TD width="10%" bgcolor="#FFCC22">&nbsp;Expired</TD>
<TD width="68%" bgcolor="#CCCCDD">&nbsp;</TD>
</TR>
<TR>
<TD>4) </TD>
<TD><INPUT size="50" name="attachment4"> </TD>
<TD><INPUT size="10" name="uploadDate4"> </TD>
<TD><INPUT size="10" name="expireDate4"> </TD>
<TD><FONT color="red"><B>&nbsp;</B></FONT> </TD>
</TR>
<TR>
<TD width="2%">&nbsp;</TD>
<TD width="98%" colSpan="4">
<INPUT size="98" name="source4">
</TD>
</TR>
</TBODY>
</TABLE>

</TD>
</TR>
</TBODY>
</TABLE>
</DIV>

</FORM>
</DIV>
</BODY>

</HTML>

Jul 24 '05 #1
0 3016

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

Similar topics

3
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification...
0
by: Alex Bell | last post by:
Thanks to the people who helped me with centering a block of text in MSIE 5.5 in the site I am developing at http://www.members.iinet.net.au/~abell1/test/index.htm with city.css at...
1
by: Marek Mänd | last post by:
I have question regarding CSS overflow atribute. <body> <table style="height:100%" id="pagetable"> <td style="vertical-align:top;"> <div...
7
by: Warren Post | last post by:
I´m trying to implement a:hover popup images like Eric Meyer did at <http://meyerweb.com/eric/css/edge/popups/demo2.html>. My take is at <http://www.cafecopan.com/dev/20050523/>. Mozilla 1.6 and...
6
by: Kor | last post by:
Hi, Does anybody understand why the technique described in http://www.macromedia.com/devnet/server_archive/articles/css_positioning_dynamic_repositioning.html doesnt work in Netscape 6/7 and...
4
by: Schraalhans Keukenmeester | last post by:
I have no clue why below code (found it somewhere and altered it a wee bit to my needs) will run without problem in both IE and Mozilla FireFox 1.0 but in the latter it takes up close to 100% cpu....
1
by: smilecry | last post by:
I am trying to create a tree table (javascript code was adopted from online source) but the rowspan in td tag does not work well when I toggle the rows. Here is the sample code, notice the row "4"...
2
by: gunnuk | last post by:
<!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"> <head> <meta...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.