Link to home
Start Free TrialLog in
Avatar of sydneyguy
sydneyguyFlag for Australia

asked on

html table and moving cell sizes

i am using ie and trying to make up a grid like excel but when you enter in the data if its longer than the cell then the cell will expand. what i want to do is to have the cell grow in height to make the adjustment instead of in width. the data is being returned via ajax and will have many
differing characer count as the data is returned

$ret.='<table>';
<td width="152" style="width:152">'.$nyz'</td>
<td width="152" style="width:152">'.$123.'</td>
<td width="152" style="width:152">'.$abv.'</td>
<td width="152" style="width:152">'.$xyz.'</td>';
            
$ret.='</table>'; User generated image
ASKER CERTIFIED SOLUTION
Avatar of Sudaraka Wijesinghe
Sudaraka Wijesinghe
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This would be better.
echo '<table>';
///
while(...) {
$ret = '<tr>';
$ret.='<td width="152" style="width:152">'.$nyz'</td>
<td width="152" style="width:152">'.$123.'</td>
<td width="152" style="width:152">'.$abv.'</td>
<td width="152" style="width:152">'.$xyz.'</td>';            
$ret.='</tr>'; 
echo $ret;
}
echo '</table>';

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and of course do what DaveBaldwin suggested... create ONE table rather than many small ones. Data within cells (cell widths) are restricted by column widths across all rows of the table.
Avatar of sydneyguy

ASKER

thanks for that am playing with a sample file now so will know by the end of the day. when we have it going.
welcome to a fantastic sunday every one,
thanks for the help rebuit the lay out and now works fine
have a good christmas and a good new year
Glad to help. Thanks for the points.