yandoo Posted May 18, 2007 Share Posted May 18, 2007 hi i was hoping for a little help please. I have created a recordset that is echoed in a table on a page This is the code used to create it: <?php echo"<table width=\"200\" border=\"0\" class=\"border_bottom\"> \n"; echo "<tr> \n"; echo "<td> </td> \n"; echo "</td> \n"; echo "</tr> \n"; echo "<tr> \n"; echo "<td>"; echo "<strong>Client Name</strong>"; echo "</td>"; echo "<td align=\"left\">"; ?> <em><a href="search_client_details.php?recordID=<?php echo $result['Client']; ?>"><?php echo $result['Client']; ?> </a></em> <?php echo " </td> \n"; echo "</tr> \n"; echo "<tr> \n"; echo "<td>"; echo "<strong>Department Code</strong>"; echo "</td>"; echo "<td>"; echo "<em>"; echo $result['DepartmentCode']; echo "</em>"; echo "</td>"; echo "</tr> \n"; echo "<tr> \n"; echo "<td> </td> \n"; echo "</td> \n"; echo "</tr> \n"; echo "<br>"; echo "</table> \n"; See attached screen print of what it looks like on page. The problem is that the Client names and Department code data fileds are NOT all flush in line!!!!! I have tried editing the above code to align=\"left\".... to the table bit at beginning...all this did is change the records from displaying DOWN the page to a ACROSS page. I then tried adding echo "<br>"; at end of it so each record would one above the other going down page - this doesnt do anything! Finally i tried to add the align=\"left\" code the the actual <td> bit of code.... E.G. echo "<td align\="left\"; This also doesnt do anything...... So basically i want the right hand column of records to be in line (flush) from left to right! Can somebody help me please>??? Thanks [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/51985-solved-echo-table-align-left/ Share on other sites More sharing options...
emehrkay Posted May 18, 2007 Share Posted May 18, 2007 i cannot believe that i jsut opened a word doc, if you wanted me to have a virus, there is your chance. anyway, this is a css issue put in your td's style =\"text-align: left;\" Quote Link to comment https://forums.phpfreaks.com/topic/51985-solved-echo-table-align-left/#findComment-256234 Share on other sites More sharing options...
yandoo Posted May 18, 2007 Author Share Posted May 18, 2007 Hi, Sory i uploaded word doc with screen print on, but no virus i can assure you.... Thanks for reply thats brilliant, worked a charm!! I found that with what you said a long with giving the 2nd columns a TD WIDTH of it worked a charm. Thanks very much indeed...... Incidently what whould i add if i wanted to valign the text to TOP as well as align left.....??????? Many thanks again kind Regards Quote Link to comment https://forums.phpfreaks.com/topic/51985-solved-echo-table-align-left/#findComment-256247 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.