www.webdeveloper.com
Results 1 to 3 of 3

Thread: Tables are centering all my data in on column to the center

  1. #1
    Join Date
    Jun 2009
    Posts
    15

    Tables are centering all my data in on column to the center

    Ok i have 1 table and inside that table i have 2 columns. One the left side i have 6 or 7 smaller tables and on the right side i have 3. But since the table hight for both of these isn't the same its centering my data on the right to the center. I want them all to be flush with the top. I have tryed margin-top:0 align top. Neither of these work. I have resorted to sticking empty cells below the one to make them the same size. This works for now but in some of my other pages i will have random numbers of tables on one side depending on the user. PLS HELP

    Here is my code:
    sorry its slopy.



    <div id="main" style="display: none">
    <table>
    <table>
    <tr>
    <tr height=20><td></td></tr>
    <td>
    <table border="0" cellspacing="0" width="255">

    <tr>
    <td>
    <table height=79 width=235 background="http://webuycrap.webs.com/Boxes/Shopping Cart.png" border=0 cellpadding=10 style="background-repeat:no-repeat;">

    <tr><td>
    <p style="Position:relative;top:10px;text-align:center;font-family:arial;color:dimgray;font-size:15;">You have <b><script language="JavaScript" type="text/javascript">document.write(randomnumber);</script></b> items in your cart</p>
    </td></tr></table>

    </td>
    </tr>



    <tr height=20><td></td></tr>

    <tr>

    <td>
    <table height=240 width=235 background="http://webuycrap.webs.com/Boxes/Products.png" border=0 cellpadding=0 cellspacing=0 style="background-repeat:no-repeat;padding-left:15" border=0 cellspacing=0>
    <tr height=20><td></td></tr>
    <tr><td><span class="class1">
    <a href="http://webuycrap.webs.com">Fixed Spring Guns</a><br>
    <a href="http://webuycrap.webs.com">Fixed Electric Guns</a><br>

    <a href="http://webuycrap.webs.com">Fixed Gas Guns</a><br>

    <a href="http://webuycrap.webs.com">Internal Parts</a><br>
    <a href="http://webuycrap.webs.com">External Parts</a><br>
    <a href="http://webuycrap.webs.com">Gift Packages</a><br>
    <a href="http://webuycrap.webs.com">Top Guns</a><br>

    <a href="http://webuycrap.webs.com">Upgrades</a><br>

    <a href="http://webuycrap.webs.com">Request a Piece</a><br>

    <a href="http://webuycrap.webs.com">FREE Tutorials</a>
    </span></td></tr></table>

    </td>
    </tr>

    <tr height=20><td></td></tr>

    <tr>

    <td>

    <table height=140 width=235 background="http://webuycrap.webs.com/Boxes/Price.png" border=0 cellpadding=0 cellspacing=0 style="background-repeat:no-repeat;padding-left:15">
    <tr height=20><td></td></tr>
    <tr><td><span class="class1">
    <a href="http://webuycrap.webs.com">Under $50</a><br>

    <a href="http://webuycrap.webs.com">From $50 to $99</a><br>
    <a href="http://webuycrap.webs.com">From $100 to $199</a><br>

    <a href="http://webuycrap.webs.com">From $200 to $499</a><br>

    <a href="http://webuycrap.webs.com">From $500 and up</a><br>
    </span></td></tr></table>

    </td>
    </tr>


    </table></td>


    <td>

    <table border="0" cellspacing="0" width="701">

    <tr>
    <td>
    </center><table height=420 width=701 background="http://webuycrap.webs.com/Boxes/Payment.png" border=0 cellpadding=10 style="background-repeat:no-repeat;">

    <tr><td style="padding-top:0"><br>
    <p style="font-family:arial;font-size:18;color:dimgray;">
    Payment Methods<br>
    <span style="font-family:arial;font-size:14;color:dimgray;">
    Sorry but at this time we only except cash.<br>We are working to get paypal. In the near future we should except money orders<br><br></span>

    Purchase of Products<br>
    <span style="font-family:arial;font-size:14;color:dimgray;">
    The purchase of any product from WeBuyCrap.com will be handled in
    this way, unless otherwise specified.<br><br>

    You will add the product(s) to your cart. When you go to checkout you
    will be asked to fill out a form that you will print out to send with
    the money for the product. After we have received the money and
    verified your purchase with the form. We will then ship you your
    product.<br><br></span>

    Sale of Products<br>
    <span style="font-family:arial;font-size:14;color:dimgray;">
    The sale of any product to WeBuyCrap.com will be handled in this way,
    unless otherwise specified.<br>

    First you will contact us about the product that you would like to
    sell. You must supply us with this information about it.<br>
    1. What the Product is.<br>
    2. What you believe is wrong with it.<br>
    3. A picture(s) or video of the product and its problem<br>
    4. A valid E-mail address<br>

    <br>
    We will review the product and then send you a E-mail as to whether we
    will buy it and for how much. Prices may be negotiable.
    </span></p></td></tr>
    <tr height=82><td></td></tr>
    </table> </td>
    </tr>

    </td></tr>
    </table>
    </td>
    </tr>

    </table>

    </td>

    </table>

  2. #2
    Join Date
    Apr 2009
    Posts
    60
    Strewth! Where to begin?

    Well, put simply you gotta start getting into css for all your display code. It'll make things so much easier in the long run...

    The problem you're mentioning can be sorted by using some css. I believe you want the contents of every cell aligned to the top? I recommend you give every table that you want to have top-aligned a css class by doing something like this in your html (you can call the class anything you like as long as you don't put spaces or numbers in the name):
    Code:
    <table class="topAlign">
    Then in the <head> section of the page or even better in a seperate css file put some css code in like this:
    Code:
    .topAlign td {
    	vertical-align: top;
    }
    Really, you need to sort the whole lot but that quick fix should solve your problem.

  3. #3
    Join Date
    Jun 2009
    Posts
    15
    Ya i know its a mess, sorry. I have all the stylesheets i just didnt link them since i wanted everything to be there.

    Ok thx ill try this, hopefully it works. If not thanks anyways

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles