zero_ZX Posted March 24, 2011 Share Posted March 24, 2011 Hi, Having issues with my script: It lists people in different departments, but i want the height of my overall table to be 100%, so that this table fills the entire screen. I'm using the following code: <html> <!-- <body style="overflow: hidden"> --> <span style="font:bold 1px arial;"> <table style="float: left; height: 100%; width: 100%px; border: 1px solid red"> <?PHP include("config.php"); $result = mysql_query("SELECT * FROM medarbejder ORDER BY medarbejder"); //echo "$result"; echo "<tbody>"; echo "<TABLE float:left height:100% border=0 width=100% >"; // <!--Start IT-afdeling--> echo"<td bgcolor=#7FFF00> <span style=font-size:48px;> <div align=center> IT-Afdelingen </div> </span> </td>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; IF ($row['status']==1 && $row['afdeling']==2) { echo "<td width=100% height=100% bgcolor=#FFFFFF> <span style=font-size:32px;> " . $row['medarbejder'] . " (til stede) </span> </td>"; } elseif ($row['status']!=1 && $row['afdeling']==2) { echo "<td width=100% height=100% bgcolor=#FF0000> <span style=font-size:32px;color=white;> " . $row['medarbejder'] . " (ikke til stede) </span> </td>"; } echo "<td>"; echo "</td>"; //echo "<br>"; echo "</tr>"; } // <!--Start Marketing-afdeling--> $result = mysql_query("SELECT * FROM medarbejder ORDER BY medarbejder"); echo"<td width=100% height=100% bgcolor=#37FDFC><span style=font-size:48px;> <div align=center> Kommunikation og marketing </div> </span> </td>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; IF ($row['status']==1 && $row['afdeling']==1) { echo "<td width=100% height=100% bgcolor=#FFFFFF> <span style=font-size:32px;> " . $row['medarbejder'] . " (til stede) </span> </td>"; } elseif ($row['status']!=1 && $row['afdeling']==1) { echo "<td width=100% height=100% bgcolor=#FF0000> <span style=font-size:32px;color=white;> " . $row['medarbejder'] . " (ikke til stede) </span> </td>"; } echo "<td>"; echo "</td>"; //echo "<br>"; echo "</tr>"; } // <!--Start Skema-afdeling--> $result = mysql_query("SELECT * FROM medarbejder ORDER BY medarbejder"); echo"<td width=100% height=100% bgcolor=#FF6600> <span style=font-size:48px;> <div align=center> Skema-lægning </div> </span> </td>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; IF ($row['status']==1 && $row['afdeling']==3) { echo "<td width=100% height=100% bgcolor=#FFFFFF> <span style=font-size:32px;> " . $row['medarbejder'] . " (til stede) </span> </td>"; } elseif ($row['status']!=1 && $row['afdeling']==3) { echo "<td width=100% height=100% bgcolor=#FF0000> <span style=font-size:32px;color=white;> " . $row['medarbejder'] . " (ikke til stede) </span> </td>"; } echo "<td>"; echo "</td>"; //echo "<br>"; echo "</tr>"; } echo "</table>"; echo "</tbody>"; mysql_close($con); ?> </span> </html> I have been searching around, but haven't found a way to apply this to my own code. Any help is much appriciated. Link to comment https://forums.phpfreaks.com/topic/231593-floating-page-height/ Share on other sites More sharing options...
MrXHellboy Posted March 24, 2011 Share Posted March 24, 2011 This is not PHP. Second of all, the height of a table will be made of the total amount of rows with, in some cases, cellspacing Link to comment https://forums.phpfreaks.com/topic/231593-floating-page-height/#findComment-1191709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.