Jump to content

Table layout question


BigD

Recommended Posts

This is my code that has 5 tables on a page. How do I prevent tables been shrinked? Only 1st table is readable on print preview.echo "<table width=\"70%\" cellpadding=\"1\" border=\"1\">\n"; echo "<tr><td><div align=\"center\">Massage Therapy Technique(Written)</div></td>\n"; echo "<td><div align=\"center\">$grade</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Massage Therapy Technique(pratical)</div></td>\n"; echo "<td><div align=\"center\">$mttp</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Anatomy,Physiology & Pathology</div></td>\n"; echo "<td><div align=\"center\">$avggrade</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Human Anatomy</div></td>\n"; echo "<td><div align=\"center\">$avggrade</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Human Pathology</div></td>\n"; echo "<td><div align=\"center\">$avggrade</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Human Physiology</div></td>\n"; echo "<td><div align=\"center\">$avggrade</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Kinesiology</div></td>\n"; echo "<td><div align=\"center\">$avggrade</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Business Practice and Professional Ethics</div></td>\n"; echo "<td><div align=\"center\">$avggrade</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Human Health & Hygiene / CPR / SFA</div></td>\n"; echo "<td><div align=\"center\">$grade</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Hydrotherapy</div></td>\n"; echo "<td><div align=\"center\">$avggrade</div></td></tr>\n"; echo "</table>\n";echo "<table width=\"60%\" height = \"20\" cellpadding=\"1\" border=\"1\">\n"; echo "<tr><td><div align=\"center\">Required Classroom Hours:</div></td>\n"; echo "<td><div align=\"center\">$rhrs</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Hours Attended to Date:</div></td>\n"; echo "<td><div align=\"center\">$ett</div></td></tr>\n"; echo "<tr><td><div align=\"center\">Make-up Hours Needed:</div></td>\n"; echo "<td><div align=\"center\">$ntt</div></td></tr>\n"; echo "</table>\n";echo "<table width=\"100%\" cellpadding=\"1\" border=\"1\">\n"; echo "<tr><td><div align=\"left\">Probationary Action Taken:</div></td></tr>\n"; echo "<tr><td>______________________________________________________________</td></tr>\n"; echo "<tr><td>______________________________________________________________</td></tr>\n"; echo "<tr><td>______________________________________________________________</td></tr>\n"; echo "</table>\n";echo "<table width=\"100%\" cellpadding=\"1\" border=\"1\">\n"; echo "<tr><td><div align=\"left\">General Comments:</div></td></tr>\n"; echo "<tr><td></td></tr>\n"; echo "<tr><td></td></tr>\n"; echo "<tr><td></td></tr>\n"; echo "</table>\n";echo "<table width=\"100%\" cellpadding=\"1\" border=\"1\">\n"; echo "<tr><td><div align=\"left\">Student's Signature:</div></td>\n"; echo "<td><div align=\"left\">Instructor's Signature:</div></td></tr>\n"; echo "<tr><td></td><td></td></tr>\n"; echo "</table>\n"; echo '<div class="page"> </div>'."\n"

Link to comment
Share on other sites

I ran your code. Please explain what you mean by shrinked based on your posted code?

Edited by niche
Link to comment
Share on other sites

Well based on what I see from your code your first table is going to be 70% of the parent container's width and the second table 30% of the parent container's width. If you're not surrounding the tables by a div with a fixed width (like 700px). The table's % widths will be off of the user's browser window, so as you resize the browser the tables will resize to maintain the 70% and 30% width. Understand?

Link to comment
Share on other sites

I attached a screen snapshot to my first post. Some how as I look at it now, it did not show correctly.What I meant was: From the web page generated by the code, I do a file > Print Preview, Only the first table can be seen, other tables are ant-sized.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...