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

    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">
    <tr height=20><td></td></tr>
    <table border="0" cellspacing="0" width="255">

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

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


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


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


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



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




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

    </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

    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>

    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.
    <tr height=82><td></td></tr>
    </table> </td>





  2. #2
    Join Date
    Apr 2009
    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):
    <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:
    .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
    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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.12571 seconds
  • Memory Usage 2,864KB
  • Queries Executed 13 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (3)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates