Table formatting options

+3 votes
385 views

What options do I have to format a table in WikiTree? Can I control adjustment, column width, or spacing between columns? I would like to reproduce the following table:

    J.J. Walter, age 43, male    |(*1789)  |Johann Jacob Walter?
         Walter, age 40, female  |(*1792)  |Elisabetha Dorothea Graf?
         Walter, age 18, female  |(*1814)  |Johanna Sophia?
         Walter, age 12, female  |(*1820)  |Louisa Friederika?
         Walter, age 10, child   |(*1822)  |Johann Friderich???
         Walter, age  6, child   |(*1826)  |Johanna Christina?
         Walter, age  3, child   |(*1829)  |???

There should be three columns per line even though in my preview of the question each line is split in half.

in WikiTree Tech by Gus Gassmann G2G6 Mach 6 (67.1k points)
When the question appears in the WikiTree Help, the table looks normal, so the first hurdle seems to be cleared.

1 Answer

+3 votes
 
Best answer

Here is a help page on tables: https://www.wikitree.com/wiki/Help:Editing_Tips#Tables

The short answer is yes - If you are working on a free-space page, you can do some highly custom tables with CSS styling. If you are working on profiles, you have to be very conservative with CSS styling since it is not recommended.

If you need some specific styling help, let me know.

by Steven Harris G2G6 Pilot (813k points)
selected by Gus Gassmann
I am working with a profile (not live yet). I want a three column table, as indicated in the question. The second and third column should be left justified, and the first column should be right justified, so that the entries, which all end in "Walter" should align on that word vertically. I'd be happy to split this column into two or three columns if that makes since easier, but I should be able to control the amount of whitespace between the columns. The information on the edit help page is a bit too terse.

I have since seen that this topic came up many times before, and I am trying read and digest the examples given in previous answers.
The most basic markup is:

{| width="40%"
|J.J.||Walter, age 43, male||(*1789)||Johann Jacob Walter?
|-
|||Walter, age 40, female||(*1792)||Elisabetha Dorothea Graf
|-
|||Walter, age 18, female||(*1814)||Johanna Sophia?
|-
|||Walter, age 12, female||(*1820)||Louisa Friederika?
|-
|||Walter, age 10, child||(*1822)||Johann Friderich???
|-
|||Walter, age  6, child||(*1826)||Johanna Christina?
|-
|||Walter, age  3, child||(*1829)||???
|}

I have found a lot of additional formatting options, but there is one last hurdle: Is it possible to use different horizontal and vertical padding?

https://www.mediawiki.org/wiki/Help:Tables gives the device

style="padding: 10px"

but that seems to apply both horizontally and vertically.

This is getting into inline CSS, which is not recommended on profiles. Not only does it make it harder for others to contribute, it is also easy to mess up the display of pages and "break stuff".

So with the understanding that this is not recommended, and that any member can remove the custom styling that you add, read up on CSS Shorthand to understand why it is applying both horizontally and vertically.

My latest effort is at Walter-8707. I can live with all but the first column, even though some of my alignment requests have been ignored. Also, the horizontal spacing is good, but the vertical spacing is too large. What am I doing wrong?
Gus, I think you are overcomplicating this a bit. The short code I gave you above does what you asked for originally.

You are also using incorrect / bloated code for CSS styling (you cannot repeat style declarations, there is no need to repeat styling elements), so the system is not sure how to process that, hence your display issues.

This is why CSS is not recommended.
Gus, refresh the profile. I have modified the table for you, stripping all CSS to get the look you have described.
Ah. I see what you did. Sneaky! I will have to remember this trick. Anyway, thanks so much! You have been wonderful.
Welcome :) Remember to always keep it simple! That normally resolves a bunch of issues!

Related questions

+4 votes
1 answer
238 views asked Oct 29, 2024 in WikiTree Tech by Gus Gassmann G2G6 Mach 6 (67.1k points)
+5 votes
1 answer
556 views asked Nov 25, 2016 in WikiTree Tech by Susan Fitzmaurice G2G6 Mach 6 (64.7k points)
+4 votes
0 answers
125 views asked Jan 2, 2016 in WikiTree Tech by David Loring G2G6 Pilot (162k points)
+17 votes
3 answers
847 views asked Jun 28, 2014 in WikiTree Tech by Jillaine Smith G2G6 Pilot (978k points)
+4 votes
2 answers
124 views asked Dec 26, 2024 in WikiTree Help by John Barraclough G2G2 (2.0k points)
+4 votes
1 answer
148 views asked Apr 27, 2024 in Photos by Rita Martin G2G2 (2.3k points)
+7 votes
1 answer

WikiTree  ~  About  ~  Help Help  ~  Search Person Search  ~  Surname:

disclaimer - terms - copyright

...