Solved

Table Positioning

Posted on 2002-05-24
5
180 Views
Last Modified: 2010-04-09
I have a table
<table align="left"> so that the next table positions along side it.
I then want another table below. So all in all I have
<table align="left"></table>
<table></table>
<table></table>
i.e. two tables side by side plus one below.
A small problem arises, there is a slight gap between the two side by side tables.
This disappears if I add another table by using
<table align="left"></table>
<table align="left"></table>
<table></table>
<table></table>.
How can I get rid of the gap without having to add the extra align="left" and extra table please?
Thanks.
0
Comment
Question by:BlueFin
5 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 50 total points
ID: 7032641
you could put the top two tables in a seperate table will 0 cellpadding/spacing:


<TABLE border='0' cellpadding='0' cellspacing='0'>
<TR><TD>

   <table border='1' align="left">
      <tr><td>&nbsp;</td></tr>
   </table>

</TD>
<TD>

   <table border='1'>
      <tr><td>&nbsp;</td></tr>
   </table>

</TD></TR>
</TABLE>
0
 
LVL 2

Expert Comment

by:Marianne
ID: 7032704
What's wrong about the second align=left ? It's the right approach.
0
 
LVL 2

Expert Comment

by:CompuTurk
ID: 7033342
I would use Cells instead of tables in your case, but you can arrange your tables with the cells of a parenting table.

Here it is:

<table cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse">
  <tr>
    <td>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="100%">&nbsp;</td>
      </tr>
    </table>
    </td>
    <td>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="100%">&nbsp;</td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="100%">&nbsp;</td>
      </tr>
    </table>
    </td>
  </tr>
</table>

Good luck...
-CompuTurk
0
 
LVL 2

Expert Comment

by:jpoesen
ID: 7034192
how about this :

<table style="display:inline;float:left">
...
</table>
<table style="display:inline;float:right">
...
</table>

Good luck
jpoesen
0
 

Author Comment

by:BlueFin
ID: 7034237
Thanks NightEnight.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question