dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: HTML centering table question

Hybrid View

  1. #1
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356

    HTML centering table question

    I know this isnt Flash related (yet), but i need a little help. I made a temp page for a project i'm about to start on. I thought that i could make a table with 100% width and 100%height, then make a table insdie of that, the same dimensions as the one image i want to insert, and make it always be dead center of the page... It aint working.. here's my code. anyone wanna troubleshoot my html? Its been a while.

    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <
    html>
    <
    head>
    <
    title>Rowdy House Productions</title>
    <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </
    head>

    <
    body>
    <
    div align="center">
      <
    table width="100%" height="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <
    tr>
          <
    td><div align="center"></div>        <table width="700" height="450" border="0" align="center" cellpadding="0" cellspacing="0">
            <
    tr>
              <
    td height="452">            <img src="images/coming_soon.jpg" alt="Rowdy House Productions.... Coming Soon...." width="700" height="450">          </td>
            </
    tr>
          </
    table></td>
        </
    tr>
      </
    table>
    </
    div>
    </
    body>
    </
    html
    to see how its appearing, check out http://www.rowdyhouseproductions.com

    thanks,
    -myk

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    Attached Files Attached Files

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Outside of the right side scrollbar (useless), this works fine for me on IE5.5. Looks dead center!
    Are you trying to get this to work and checking it with Netscrap?

  4. #4
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    I see it centered, right to left, but it's at the top, not the middle.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Uhmmmmmm! Maybe your glasses!

  6. #6
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    Not this time. LOL
    Attached Images Attached Images

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    What's this browser?

  8. #8
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    IE6. But even the source code on that page shows the nested table is only centered side to side, not set for middle:

    <*td><*table width="700" height="450" border="0" align="center" cellpadding="0" cellspacing="0">

    It should read:

    <*td><*table width="700" height="450" border="0" valign="middle" align="center" cellpadding="0" cellspacing="0">
    Last edited by iaskwhy; 10-24-2003 at 12:49 AM.

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Definately your glasses!

    That's why I'm staying on MX and IE5.5!
    Last edited by oldnewbie; 10-24-2003 at 01:15 AM.

  10. #10
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    i'll give it a try, adding the valign. According to Dreamweaver MX 2004, the valign tag is not supported by IE6, though..
    Guess we'll find out.. Will post back later.

    -myk

  11. #11
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    i added the valign and it still gave me the same results in Opera and in IE6.
    Any other ideas? I know that used to work.

    thanks,
    -myk

  12. #12
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    >>I know that used to work<<

    Tell me about it. It makes you doubt your sanity sometimes.

    Try the attachment. I tested that and it worked also, without the valign tag. But I've used that tag, and am using it now on a page, and it works too, when used inside a table counting it as a single cell.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center