cluce Posted September 14, 2007 Share Posted September 14, 2007 can someone tell me how to format my table data to courier new and the font size to 10 and the font color to green within my code. $display_block = "<p align = 'center'> <table id='mytable' class='sortable' border = '1' bordercolor = 'gray cellpadding= '0' cellspacing = '0'> <thead> <th bgcolor = 'orange'>Item Number</th> <th bgcolor = 'orange'>Manufacturer</th> <th bgcolor = 'orange'>Category</th> <th bgcolor = 'orange'>Description</th> <th bgcolor = 'orange'>Model</th> <th bgcolor = 'orange'>Quantity</th> <th bgcolor = 'orange'>Kw</th> <th bgcolor = 'orange'>Hours</th> <th bgcolor = 'orange'>Price</th> </thead> <tbody>"; //if authorized, get the values while ($info = mysqli_fetch_array($result)) { //create display string $display_block .= " <tr> <td>".$info['Item_No']."</td> <td>".$info['Manufacturer']."</td> <td>".$info['Category']."</td> <td>".$info['Description']."</td> <td>".$info['Model']."</td> <td>".$info['Qty']."</td> <td>".$info['Kw']."</td> <td>".$info['Hours']."</td> <td>".$info['Price']."</td> </tr>"; } $display_block .= "</tbody></table></p>"; Quote Link to comment Share on other sites More sharing options...
FridayRain Posted September 14, 2007 Share Posted September 14, 2007 You could use a CSS class to apply a font to that text. For example: #mytable th { font-size: 10pt; font-family: "Courier New", "Courier", monotype; color: #00ff00; } Quote Link to comment Share on other sites More sharing options...
cluce Posted September 14, 2007 Author Share Posted September 14, 2007 thansk 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.