You are here: How do you center several tables side by side on a single row? « HTML « IT news, forums, messages
How do you center several tables side by side on a single row?

Posted by vanbc on 11/26/88 11:54

Hi,
I have 4 tables that need to be on a single row and centered on the
page. The easiest way I've done it is to nest the 4 tables in a table.

Would anyone know how do this without nesting as some validators
won't pass it.

using "float: left;" will push all the tables to the left, but i want
it centered. Anyone have any suggestions?

Some sample code - the width: 200px helps a bit...still nothing as
nice nesting tables:

<div style="text-align: center; ">
<div style="margin: 0 auto; width: 200px; text-align: left; ">
<table style="background: #99FF33; float: left;">
<tr>
<td>one AAA
</td>
<td>two
</td>
</tr>
<tr>
<td>three
</td>
<td>four
</td>
</tr>
</table>
<table style="background: yellow; float: left;">
<tr>
<td>one
</td>
<td>two
</td>
</tr>
<tr>
<td>three
</td>
<td>four
</td>
</tr>
</table>
</div>
</div>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация