Jump to content

"Floating" page height


zero_ZX
 Share

Recommended Posts

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
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.