sdowney1 Posted March 6, 2011 Share Posted March 6, 2011 vertical-align='top' ignored in table vertical-align:top is also ignored it does respond to width and also does respond to align I put some data in a table with 2 columns when ever the second column overruns the width so the text wraps, the first column text centers in the table cell. I want it to pin itself to the top of the cell. this is it here. //print array here, split off chr(29) echo "<table width='952' border='0'>"; //$mdata holds the tag names with each number corresponding to the text name $loop600 = 1; while ($loop600 < 900)//dont show local LOC tags { if (!empty($taggs[$loop600])) { $arr = explode(chr(29),$taggs[$loop600]); //if ($loop600 == 650) {print_r ($arr);} echo " <tr>"; echo " <td WIDTH='350';vertical-align='top'; align='right'>$mdata[$loop600]</td>"; //the names of the numbered fields echo " <td WIDTH='600';vertical-align='top'; align='left'>$arr[2]</td>"; //the first data of the subfield of the tag echo " </tr>"; for ($i = 3; $i < count($arr); $i += 2) { echo " <tr>"; echo " <td>"." "."</td>"; echo " <td>".$arr[($i+1)] ."</td>"; echo " </tr>"; } $arr = array(); } $loop600 = ($loop600 +1); } Quote Link to comment Share on other sites More sharing options...
sdowney1 Posted March 6, 2011 Author Share Posted March 6, 2011 fixed with these, either one will work by help from http://ubuntuforums.org/showthread.php?p=10528481#post10528481 // echo " <td WIDTH='350' VALIGN='top' align='right'>$mdata[$loop600]</td>"; //the names of the numbered fields // echo " <td WIDTH='600' VALIGN='top' align='left'>$arr[2]</td>"; //the first data of the subfield of the tag echo " <td style='width:350px;vertical-align:top;text-align:right;'>$mdata[$loop600]</td>"; //the names of the numbered fields echo " <td style='width:600px;vertical-align:top;text-align:left;'>$arr[2]</td>"; //the first data of the subfield of the tag Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.