Jump to content

vertical-align='top' ignored in table


sdowney1

Recommended Posts

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);
  }

Link to comment
Share on other sites

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  

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.

×
×
  • 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.