Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

HTML Table Formatting Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HTML Table Formatting Help

    This is driving me crazy, I have 3 controls in one html table and one of them will simply not line up with the other 2 no matter what I do.

    2016-01-28_11-06-07.jpg

    This is the current code:

    Code:
    <table style width="720px" border="0" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">
    	<tr>
    		<td align="left">&nbsp;{PARTNUMBER}&nbsp;</td>
    		<td align="left">&nbsp;{PARTALTNUMBER1}&nbsp;</td>
    		<td align="left">&nbsp;{PARTALTNUMBER2}&nbsp;</td>
    		<td align="left">&nbsp;{PARTALTNUMBER3}&nbsp;</td>
    	</tr>
    	<tr>
    		<td align="left">&nbsp;{PARTDESCRIPTION}&nbsp;</td>
    		<td align="left">&nbsp;{PARTNOTES}&nbsp;</td>
    	</tr>
    </table>
    
    <table style width="720px" border="0" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">	
    	<tr>
    		<tr><th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Location 1</th>
                         <th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Location 2</th>
                         <th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Supplier</th></tr>
    		<td align="left" width="60">&nbsp;{LOCATION1}&nbsp;</td>
    		<td align="left" width="60">{LOCATION2}&nbsp;</td>
    		<td align="left">{SUPPLIERID}&nbsp;</td>
    	</tr>
    </table>
    Does anybody see anything wrong with my code? And yes, I have tried adding width="60" to the problem control, but then the controls spread apart like this not matter what value I use ie) 20, 40, 60, etc.

    2.jpg
    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

    #2
    Re: HTML Table Formatting Help

    width="60" is probably invalid. You need to specify a unit, as in width=60px

    You're missing a <tr> before your <td> cells with the controls at issue.

    And instead of putting each control in its own <td>, try combining into one:
    Code:
    <tr>
    <td colspan="3"> &nbsp; {LOCATION1} &nbsp; {LOCATION2} &nbsp; {SUPPLIERID} &nbsp; </td>
    </tr>
    -Steve
    sigpic

    Comment


      #3
      Re: HTML Table Formatting Help

      Code:
      <table style width="720px" border="0" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">	
      	<tr>
      		<tr><th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Location 1</th>
                           <th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Location 2</th>
                           <th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Supplier</th>
                     </tr>
                     [COLOR="#FF0000"]<tr>[/COLOR]
      		<td align="left" width="60">&nbsp;{LOCATION1}&nbsp;</td>
      		<td align="left" width="60">{LOCATION2}&nbsp;</td>
      		<td align="left">{SUPPLIERID}&nbsp;</td>
                    [COLOR="#FF0000"]</tr>[/COLOR]
      	</tr>
      </table>
      I do not know this will correct, but I don't see another row in the table.
      the first and the last <tr> </tr> may not be needed.
      thanks for reading

      gandhi

      version 11 3381 - 4096
      mysql backend
      http://www.alphawebprogramming.blogspot.com
      [email protected]
      Skype:[email protected]
      1 914 924 5171

      Comment


        #4
        Re: HTML Table Formatting Help

        Code:
        <table style width="720px" border="0" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">	
        	[COLOR="#FF0000"]<tr>[/COLOR]
        		<tr><th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Location 1</th>
                             <th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Location 2</th>
                             <th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Supplier</th>
                       </tr>
                       <tr>
        		<td align="left" width="60">&nbsp;{LOCATION1}&nbsp;</td>
        		<td align="left" width="60">{LOCATION2}&nbsp;</td>
        		<td align="left">{SUPPLIERID}&nbsp;</td>
                      </tr>
        	[COLOR="#FF0000"]</tr>[/COLOR]
        </table>
        Too many <tr> in this example. Get rid of the red ones.
        -Steve
        sigpic

        Comment


          #5
          Re: HTML Table Formatting Help

          the first and the last <tr> </tr> may not be needed.
          good to see steve and I are saying the same thing, glad to be in good company.
          thanks for reading

          gandhi

          version 11 3381 - 4096
          mysql backend
          http://www.alphawebprogramming.blogspot.com
          [email protected]
          Skype:[email protected]
          1 914 924 5171

          Comment


            #6
            Re: HTML Table Formatting Help

            THANK YOU Steve & Ghandi!

            The px didn't seem to have any effect, nor did the missing <tr></tr> although I put that in for correctness.
            Adding the colspan did the trick though I had to add a bunch of &nbsp to align the titles but now it looks good.

            Table.jpg

            Here's my final code.

            Code:
            <table style width="720px" border="0" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">
            	<tr>
            	     <td align="left">&nbsp;{PARTNUMBER}&nbsp;</td>
            	     <td align="left">&nbsp;{PARTALTNUMBER1}&nbsp;</td>
            	     <td align="left">&nbsp;{PARTALTNUMBER2}&nbsp;</td>
            	     <td align="left">&nbsp;{PARTALTNUMBER3}&nbsp;</td>
            	</tr>
            	<tr>
            	     <td align="left">&nbsp;{PARTDESCRIPTION}&nbsp;</td>
            	     <td align="left">&nbsp;{PARTNOTES}&nbsp;</td>
            	</tr>
            </table>
            
            <table style width="720px" border="0" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">	
            	<tr>
            	     <th align="left" style="color:#3e647e; font-size:5; font-weight:lighter;">&nbsp;Location 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Location 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Supplier</th>
            	<tr>
            	     <td colspan="3">&nbsp;{LOCATION1}&nbsp;{LOCATION2}&nbsp;{SUPPLIERID}&nbsp;</td>
            	</tr>
            </table>
            So thanks again guys, much appreciated!
            Last edited by iRadiate; 01-28-2016, 02:00 PM.
            Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

            Comment


              #7
              Re: HTML Table Formatting Help

              Good. Your next learning assignment is how to use CSS to style this. If you're going to do much table work then taking a bit of time for that is really worthwhile. Here's a cheap example:

              Code:
              <style type="text/css">
              <!-- 
              th {
              	font-size: 10pt;
              	font-weight: bold;
              	text-align:right;
              }
              
              td {
              	text-align:right;
                  font-size: 10pt;
              }
              
              .alnleft {
                 text-align: left;
                 font-size: 10pt;
                 font-family: Verdana,Microsoft Sans Serif;
              }
              //--> 
              </style>
              -Steve
              sigpic

              Comment


                #8
                Re: HTML Table Formatting Help

                this is confusing to me. but happy you solved it.
                thanks for reading

                gandhi

                version 11 3381 - 4096
                mysql backend
                http://www.alphawebprogramming.blogspot.com
                [email protected]
                Skype:[email protected]
                1 914 924 5171

                Comment


                  #9
                  Re: HTML Table Formatting Help

                  Originally posted by Steve Workings View Post
                  Good. Your next learning assignment is how to use CSS to style this. If you're going to do much table work then taking a bit of time for that is really worthwhile. Here's a cheap example:
                  Yes, yes I know Steve
                  I've spent the last number of years working on functionality, and last fall moving to IIS. Styling is something I have long procrastinated about, but I do need to figure it out.

                  The confusing part to me about css as it relates to Alpha is where and when to use it. It seems there are css files in multiple places and folders. And the Alpha style editor is terrible.
                  Something like this may be helpful to me ... http://www.alphasoftware.com/alphafo...ylizer-for-CSS
                  Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                  Comment


                    #10
                    Re: HTML Table Formatting Help

                    Stephen
                    May I ask you some questions?
                    For the second table you have but one column head that contains lots of nbsp, and the next row has column=3
                    How does that fit?
                    If you going to display only one column each, why work hard with tables. Will this display properly in different size monitors?
                    Last edited by GGandhi; 01-28-2016, 06:36 PM.
                    thanks for reading

                    gandhi

                    version 11 3381 - 4096
                    mysql backend
                    http://www.alphawebprogramming.blogspot.com
                    [email protected]
                    Skype:[email protected]
                    1 914 924 5171

                    Comment


                      #11
                      Re: HTML Table Formatting Help

                      Code:
                      <th align="left" style="color:#3e647e; font-size:5; font-weight:lighter;">&nbsp;Location 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Location 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Supplier</th>
                      	<tr>
                      	     <td colspan="3">&nbsp;{LOCATION1}&nbsp;{LOCATION2}&nbsp;{SUPPLIERID}&nbsp;</td>
                      	</tr>
                      If you use the above code, I think you are going to start having problems keeping the labels lined up with the data elements once you start putting real data into the form.

                      I suggest, when you are viewing it in the browser, that you press F12 and inspect the html that is the actual final output. Then, compare that to the HTML that alpha generates if you did this same thing in the Detail portion of a Grid. A lot can be learned about formatting things into tables by looking at what Alpha generates for the detail portion of a grid. If you want items on the same row to be located next to each other and not lined up in columns with the rows above and below then put a "Container begin" and "Container end" around each group of fields you want included as separate rows in the Detail portion of a Grid.

                      Comment


                        #12
                        Re: HTML Table Formatting Help

                        Code:
                        <table style width="720px" border="0" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">	
                        	<tr>
                        		<tr><th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Location 1</th>
                                             <th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Location 2</th>
                                             <th align="left" style="color:#3e647e;font-size:5; font-weight:lighter;">&nbsp;Supplier</th></tr>
                        		<td align="left" width="60">&nbsp;{LOCATION1}&nbsp;</td>
                        		<td align="left" width="60">{LOCATION2}&nbsp;</td>
                        		<td align="left">{SUPPLIERID}&nbsp;</td>
                        	</tr>
                        </table>
                        stephen
                        this is the second table from the first post. it is not done right at all in my opinion.
                        you are defining the table to be 720px wide but the data are left to decide for themselves, and when it comes to td you have 60 which will not change anything.
                        the correct way of doing that table, may i suggest:

                        Code:
                        <table style width="720px" border="1" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">	
                        		<tr>
                                        <th align="left" width="240px" style="color:#3e647e;font-size:5; font-weight:lighter;">Location 1</th>
                                         <th align="left" width="240px" style="color:#3e647e;font-size:5; font-weight:lighter;">Location 2</th>
                                         <th align="left" width="240px" style="color:#3e647e;font-size:5; font-weight:lighter;">Supplier</th>
                                         </tr>
                                         <tr>
                        		<td align="left">{LOCATION1}</td>
                        		<td align="left">{LOCATION2}</td>
                        		<td align="left">{SUPPLIERID}</td>
                        	        </tr>
                        </table>
                        i placed border="1" in the code above so you can see the layout, if you are happy then return back to "0". this will divide the table in three equal parts and the data will share the space properly. hope you do not mind me persisting on this topic.

                        edit:
                        http://screencast.com/t/nEyZgtWyM1T
                        here is the result.
                        you probably can remove "style", the word, from table still get the same result.
                        Last edited by GGandhi; 01-28-2016, 10:18 PM.
                        thanks for reading

                        gandhi

                        version 11 3381 - 4096
                        mysql backend
                        http://www.alphawebprogramming.blogspot.com
                        [email protected]
                        Skype:[email protected]
                        1 914 924 5171

                        Comment


                          #13
                          Re: HTML Table Formatting Help

                          I went back after my last post yesterday and cleaned things up a bit with the colspan property for each data row but not each header row. I also eliminated the 2nd table.

                          Code:
                          table style width="720px" border="1" bordercolor="" bordercolorlight="" bordercolordark="" bgcolor="#e7e7f7" cellpadding="4" cellspacing="0">
                          	<tr>
                          		<td colspan="4">&nbsp;{PARTNUMBER}&nbsp;{PARTALTNUMBER1}&nbsp;{PARTALTNUMBER2}&nbsp;{PARTALTNUMBER3}&nbsp;</td>
                          	</tr>
                          	<tr>
                          		<td colspan="2">&nbsp;{PARTDESCRIPTION}&nbsp;{PARTNOTES}&nbsp;</td>
                          	</tr>
                          	<tr>
                          		<th align="left" style="color:#3e647e; font-size:5; font-weight:lighter;">&nbsp;Location 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Location 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Supplier</th>
                          	</tr>
                          	<tr>
                          		<td colspan="3">&nbsp;{LOCATION1}&nbsp;{LOCATION2}&nbsp;{SUPPLIERID}&nbsp;</td>
                          	</tr>
                          </table>
                          But this still gives me a gazillion &nbsp's to get the headers to align. With the border turned on it looks like this.

                          Table 1.jpg

                          Ghandi, I can see from your image that I need the header rows divided in order to make them line up with the data.
                          This should also take care of the requirement for all the &nbsp's, which as Rich points out is likely a very bad idea!

                          I'll keep working on it...
                          Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                          Comment


                            #14
                            Re: HTML Table Formatting Help

                            why are you using colspan when you don't have any columns that differ.
                            colspan comes into play only when one row has different columns than the others.
                            thanks for reading

                            gandhi

                            version 11 3381 - 4096
                            mysql backend
                            http://www.alphawebprogramming.blogspot.com
                            [email protected]
                            Skype:[email protected]
                            1 914 924 5171

                            Comment


                              #15
                              Re: HTML Table Formatting Help

                              stephen you are going about wrong way.
                              post an image what you want to look like this afternoon i will post a table for you.
                              thanks for reading

                              gandhi

                              version 11 3381 - 4096
                              mysql backend
                              http://www.alphawebprogramming.blogspot.com
                              [email protected]
                              Skype:[email protected]
                              1 914 924 5171

                              Comment

                              Working...
                              X