Have put together photos by using table, and wondered how do I keep the margins the same on both left and right. They appear equal on my 22 inch screen, but on smaller 17 the right margin is much smaller.
<table align=“center”>
<tr>
<td>
<a href=“thumbs/AbeGlennthumb.jpg”><img src=“images/AbeGlenn.jpg” width=“280” height=“200” alt=“Gang at Expo”></a>
Also you might want to reconsider using a table (it’s not tabular data so isn’t the appropriate tag), and the center and b tags which are now either depreciated or inappropriate in this case
There are errors in your CSS style which over-ride the CSS script used to center the table. Please use the following code to replace everything up to and including the new <body> statement
Barnum, one thing I’ve found that helps is to create a separate HTML file and test exactly what’s being advised, get it to work in that simplified state then from there see why it isn’t working in the context of the page. So this is the simplest possible centered table using CSS rules only.
The width is 50% of the parent, in this case the body. Margin declarations are trickier. If you give one value it’s applied to all sides. If you give two values the first will be applied to the top & bottom margins, and the second to the left & right. Finally you can give all 4 values in order top, right, bottom, left (They are in clockwise order). So if we want to center a table with a top margin of 10 and a bottom of 20 we’d go
10em, auto, 20em, auto.
Margins can be given in various units, but that’s another discussion.
Either you are trolling, you didn’t read any post of the thread or you have the reading comprehension skills of a 5 year old.
Tables are not for page layout. They are for tabular data.
This thread has been about how to center a table using CSS. It is not about using tables to position objects. It is certainly not about using the deprecated <center> tag.