I am facing an issue with a table that extends beyond the browser edges, and I am unsure how to fix this. Here is the code snippet for the table:
It's important to note that I am using PHP.
function create_Chat_Table($text){
$pseudo=$_GET['DATA_Pseudonyme'];
$output="<form method='get'>";
$output .= "<table>";
for ($i = 0; $i < count($text); $i++) {
$explode = explode(",", $text[$i]);
if (isset($_GET['DATA_Pseudonyme'])){
$href='index.php?page=chatrooms&room=' . $explode[0] . '&DATA_Pseudonyme=' . $pseudo;
}else{
$href='https://foxi.ltam.lu/2TPIF2/tarlu584/Projet_WSERS_Zelda/index.php?page=Pseudonyme';
}
$output .= "<td id='table_chats'><a href=$href>$explode[0]<img src='" . $explode[1] . "' alt='Chat Room Image' width='100px'></td>";
}
$output .= "</table>";
$output.="</form>";
return $output;
}
table{
display: inline-table;
margin: 1em;
border: 2px solid black;
}
table td{
border: solid 3px;
}
This code is for a school project where we are developing a chatroom. See image here for reference