Solved

Table Positioning

Posted on 2002-05-24
5
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
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).

726 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