troubleshooting Question

Add a little space on either side of a table.

Avatar of breeze351
breeze351 asked on
HTML
12 Comments1 Solution140 ViewsLast Modified:
I have some code that works Ok, but now they want a little space on the left and right.  I've tried several solutions and I can't figure out what the code needs to be. Does the total of the table columns have to be less than 100%?

Here's the code:
<table id= "Three_Line_Display" style="margin-left: 5px auto; margin-right: 5px auto;" border="0" cellspacing="0" cellpadding="0">
	<?php
		// Create table header
		echo "<tr>";	
		echo '<td width = 20% class="Body_Labels" align="left">Address</td>';
		echo '<td width = 25% class="Body_Labels" align="left">Contact</td>';
		echo '<td width = 9% class="Body_Labels" align="center">Size</td>';
		echo '<td width = 9% class="Body_Labels" align="center">Rental</td>';
		echo '<td width = 12% class="Body_Labels" style="padding-left: 10px" align = "left">Possession</td>';		
		echo '<td width = 13% class="Body_Labels" style="padding-left: 10px" align = "left">Term</td>';
		echo '<td width = 8% class="Body_Labels" style="padding-left: 10px" align = "left">List/Update</td>';
		echo '<td width = 14% class="Body_Labels" align="center">Image</td>';
		echo '</tr>';
		
		// End Table Header 	
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros