|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Table within a div
I've got a table within a div (within a div). I use the List apart hack to fix the footer problem across different browsers. All works well but on Mozilla if the div contains a table it messes things up and won't detect that the div should be longer. So the footer appears at the top of the page.
Does anyone know how to detect that the div should be longer due to the table. To see the problem go to this URL (using Netscape or mozilla). http://www.businessshack.com.au/sub....php?state_id=1 I'm really stuck on this so any help would be greatly appreciated.. Thanks |
|
#2
|
||||
|
||||
|
RE: Table within a div
Resolution is to give the table an ID. Then the div will stretch.
|
|
#3
|
|||
|
|||
|
RE: Table within a div
huh?!?
can you post the sample code? the "before" and "after" examples? that doesn't make sense.. |
|
#4
|
||||
|
||||
|
RE: Table within a div
After : Code:
<form name="biz_table" action="delete_biz.php" method=post>
<table align="left" width= "100%" id="csst" cellpadding="2" cellspacing="2" >
<?
if (is_array($biz_array) && ($number_of_biz > 0)){
?>
<tr height='22' align='left'>
<th class='bizheading' width="25%">Name</th>
<th class='bizheading' width="5%">Visits</th>
<th class='bizheading' >Title</th>
<th class='bizheading' >Expiry Date</th>
<th class='bizheading' >Delete</th>
</tr>
<?
//foreach ($biz_array as $bizname)
for ($i=0; $i<$number_of_biz; $i++) {
if ($color == "#f0f1f0") {
$color = "#ffffff";
} else {
$color = "#f0f1f0";
}
echo "<tr bordercolor=".$color." bgcolor=$color >";
echo "<th><a href="".EDIT_BIZ_FORM."?edit=1&bizid=".$biz_array[$i][1]."">".htmlspecialchars($biz_array[$i][0])."</a></strong></th>";
echo "<th>".$biz_array[$i][2]."</th>";
echo "<th><a href="".BIZ_DISPLAY_PAGE."?bizid=".$biz_array[$i][1]."">".$biz_array[$i][5]."...</a></th>";
echo "<th><a href="edit_biz_form.php?edit=true&bizid=".$biz_array[$i][1]."">".$biz_array[$i][4]."</a></th>";
echo "<th><input type=checkbox name="del_me[]"value="".$biz_array[$i][1]."" /></th>";
echo "</tr>";
}
echo "</table>";
}
?>
</form>
just remove the ID tag from the table declaration for the before. I don't ask why anymore - I just accept that it suddenly works. If you have a better way - please let me know. |
|
#5
|
|||
|
|||
|
RE: Table within a div
ok, if it is not so hard for you, can you post the resulting html (ie from "view source" from your browser) and a related css file (if that is important).
btw, does it matter what id you put on a table? sorry to bore you with this, but i amuse myself with stupid browser bugs like that.. ;) |
|
#6
|
||||
|
||||
|
RE: Table within a div
well if you'd like to fix a few annoying browser issues ..... just say the word.
Look at the real thing to www.businessshack.com.au and login as the name and pass that I pm you. If you are using mozilla the page should display without fault - if IE then there is another small bug - one of a few... thanks |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Table within a div |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|