Computer Science Canada How do I make columns in a table align? |
Author: | dampflames [ Wed Sep 15, 2004 3:48 pm ] |
Post subject: | How do I make columns in a table align? |
I'm a total beginner, and I tried to find a tutorial on this... So, how can I make columns align? Without using the "locate" command or anything. |
Author: | Dan [ Wed Sep 15, 2004 4:12 pm ] | ||
Post subject: | |||
If you are just using simple text then i whoul use tabs. If u put a \t in a string it will act as a tab and alow u to do better spacing for a table:
Only problem is if the text is to long and gose in to the next cell it will push everything over. To solve that i whould use 2 '\t's rather then one. |
Author: | dampflames [ Wed Sep 15, 2004 8:14 pm ] | ||
Post subject: | |||
Hacker Dan wrote: If you are just using simple text then i whoul use tabs. If u put a \t in a string it will act as a tab and alow u to do better spacing for a table:
Only problem is if the text is to long and gose in to the next cell it will push everything over. To solve that i whould use 2 '\t's rather then one. But 3 wouldn't be aligned "to the right" over Mazer and Delta beneath it, would it? |
Author: | Cervantes [ Wed Sep 15, 2004 8:38 pm ] | ||
Post subject: | |||
if you put the extra \t everywhere except where the text is longer than one tab space, such as my name in Dan's example, everything will work fine.
|
Author: | Andy [ Thu Sep 16, 2004 3:44 pm ] | ||
Post subject: | |||
use this
but do keep in mind that strings are left aligned and numbers are right aligned |
Author: | Artermis [ Fri Sep 24, 2004 9:35 pm ] | ||
Post subject: | |||
Can someone please help this code? I'm trying to get it to align as well, but the tab doesn't work on my for... put... line... yeah... help!!
|
Author: | AsianSensation [ Fri Sep 24, 2004 10:43 pm ] | ||
Post subject: | |||
well, you are suppose to play around with the values to see which makes your columns the best looking ones. so something like this:
Though normally, you can just count the letters "NumberSquare\tCubet\tSquare Root\tCube Root", like NumberSquare is 12 letters long, you want the number to appear in the middle, so you would do something like indenting 6 spaces. If you are really meticulous, you could always match up the middle of the number to the middle of the word, and that would involve some arithmetics. |