Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Center (vertical and horizontal) a table in a table cell

Posted on 1999-07-24
10
Medium Priority
?
304 Views
Last Modified: 2010-04-09
I tried to insert a table in a cell of another table. I would like to have the new table centered (both V and H). No matter what I do, the new table always at the top of the cell (center is working, but not valign="middle").
0
Comment
Question by:xiangenhu
[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
10 Comments
 
LVL 3

Expert Comment

by:messentary
ID: 1852292
Have you tried adding a <div="center"> tag within the cell?  i.e.  
<table border="1" width="100%" height="383">
  <tr>
    <td width="50%" height="377"><div align="center"><center><table border="1" width="59%">
      <tr>
        <td width="50%">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
    </table>
    </center></div></td>
    <td width="50%" height="377"></td>
  </tr>
</table>

0
 
LVL 10

Accepted Solution

by:
MasseyM earned 200 total points
ID: 1852293
You need to create two tables:

<TABLE HEIGHT="100%" WIDTH="100%"><TR><TD ALIGN="CENTER" VALIGn="MIDDLE">
<!-- Your table here... -->
<TABLE ALIGN="CENTER" VALIGN="MIDDLE">

</TABLE>
<!-- End your table -->
</TD><TR></TABLE>

The 1st table give your second table the entire window to work with.
0
 
LVL 3

Expert Comment

by:messentary
ID: 1852294
Massey,

Isn't that exactly what I said?  Are you trying to grab points by repeating answers?

0
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!

 
LVL 10

Expert Comment

by:MasseyM
ID: 1852295
Ummm... No.  Yours doesn't work :)

YOu only span 383 pixels up and down... My screen is 1600x1200, So it wont't work on mine :)

Also, you don't have the horzontal align correct.... So, check yourself before accusing others...

Later.

Matt
0
 
LVL 3

Expert Comment

by:messentary
ID: 1852296
the table sizes are completely irrelovent and will be adjusted to the users preference.  The answer to his question was with the new table added within the cell.
0
 
LVL 3

Expert Comment

by:messentary
ID: 1852297
besides, the key is <div align="center"><center><table> within the <td>. It worked for me on both IE and Netscape
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1852298
Ok.  You may reject my answer if you like... No worries.. I don't need the points.. Just trying to help...

sorry
0
 
LVL 3

Expert Comment

by:messentary
ID: 1852299
Massey,
I know you know what you're talking about, and both our answers will work.  But being part of EE, you should know to only place comments until asked to repost.
0
 

Expert Comment

by:sahapan
ID: 1852300
I suggested you  to use Macromediadreamweaver,It's very
easy.  : )
0
 
LVL 1

Expert Comment

by:kodiakbear
ID: 6813928
Fixed the -1 problem on this question.
Escrow points corrected.

kb
Community Support Moderator
Experts Exchange
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

661 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