The problem:
There are two tables within a DIV, one on top of the other. (Yes, the tables contain tabular data.) The bottom table needs to have more space underneath, either margin-bottom or padding-bottom.
For two days now, I’ve been trying to make this work in IE7 & IE8. It works fine in Firefox, by the way, but IE does not seem to accept margin-bottom or padding-bottom for the table at the bottom.
After Google-ing and perusing forums like crazy, I have not found anything that would classify this as an IE-specific problem. So it must be me, right?
Here’s some example HTML code that “my developers” are generating in PHP:
<div id="leftSideBorder">
<div class="header">Appraisal Checklist</div>
<div class="content"><a onclick="openChromelessWindow('?mode=mEmployee&job=appraisal_form&chromeless=1','AppraisalForm');" class="viewCurrentAppraisalLink" title="View Current Appraisal">View Current Appraisal</a></div>
<div class="clear"></div>
<table id="TUBcAa7vAt" class="tableSelector"><thead id="thead_TUBcAa7vAt"><tr><th class="thAcSubHeader" onclick="tableReSort('TUBcAa7vAt', 0);">Factors<img id="h_FDoNZ" src="./images/toggle_empty.gif" alt="arrow"></th> <th class="control">Score</th> <th class="control">Comments</th> </tr></thead><tbody id="tbody_TUBcAa7vAt"><tr class=" alt_row"><td class="fgNameTd"><a href="?mode=mAppraisal&job=evalFactor&criterion_id=305" title="Safetyhood">Safetyhood</a></td><td class="control"><img src="./images/x_icon_15x15.png" title="Incomplete"></td><td class="control"><img src="./images/x_icon_15x15.png" title="Incomplete"></td></tr><tr class=""><td class="fgNameTd"><a href="?mode=mAppraisal&job=evalFactor&criterion_id=306" title="Friendliness">Friendliness</a></td><td class="control"><img src="./images/x_icon_15x15.png" title="Incomplete"></td><td class="control"><img src="./images/x_icon_15x15.png" title="Incomplete"></td></tr></tbody></table>
<table id="LhiQy2AMe2" class="tableSelectorLast"><thead id="thead_LhiQy2AMe2"> <tr> <th class="thAcSubHeader" onclick="tableReSort('LhiQy2AMe2', 0);">Goals<img id="h_73mFl" src="./images/toggle_empty.gif" alt="arrow"></th> <th class="control">Score</th> <th class="control">Comments</th> </tr></thead><tbody id="tbody_LhiQy2AMe2"><tr class=" alt_row"><td class="fgNameTd"><a href="?mode=mAppraisal&job=evalGoal&criterion_id=457" title="Test Goald">Test Goald</a></td><td class="control"><img src="./images/check_icon_15x15.png" title="Complete"></td><td class="control"><img src="./images/x_icon_15x15.png" title="Incomplete"></td></tr></tbody></table>
</div>
And here’s the essential CSS for the two tables (minus the font attributes and borders, which are defined elsewhere):
#leftSideBorder table.tableSelector {
clear: both;
table-layout:fixed;
margin-bottom: 10px;
}
#leftSideBorder table.tableSelectorLast {
height: auto;
table-layout:fixed;
margin-bottom: 50px;
padding-bottom: 50px;
}
In my despair, I’ve added the clear, table-layout and height attributes.
Has anyone else had similar issues?
The margin-bottom for the first table (class=“tableSelector”) does kick in, just not for the bottom table.
Since “the developers” are generating the HTML code in PHP, I can only touch the CSS for the page elements (otherwise I would have hacked another DIV or P or something below the table).
Anyone?