Table format inconsistent

+3 votes
143 views

I have an FSP where I'm trying to create several tables. Identical columns in each table; tables separate data by surname.

I've tried building the tables manually and with the wizard. No matter which I use, the results are the same: The width of the first column varies from table to table. Two tables have the column the same width as the data. The other two columns are narrower than the data and cause line-wrap of the data. The width of the data is identical in all tables.

What's interesting is that in one of the wizard built tables the column width is the same as the data width. In the other the column width is narrower!

Any ideas?

/s/jr

[[Space:Regan/Morehouse Cemetery Links]]

in WikiTree Help by Jerry Regan G2G6 Mach 1 (10.4k points)
reopened by Jerry Regan

Not an expert on table coding, but the table that is narrower has the width parameter as %100 instead of 100%.

With all due respect....

Pasted below are the table definitions created by the wizard. The width parameters look identical to me. Both headers were created by the wizard, yet the second table displays a narrower 1st column. (Sorry for extra blank lines, mail  editor)

<quote>

=== Test Wizard 1 ===

{| border="2" cellpadding="3" width="100%"

|+ '''Test Wizard'''

|-

! '''Cemetery Link''' !! '''Name '''

|-

|}

=== Test Wizard 2 ===

{| border="2" cellpadding="3" width="100%"

|+ '''Morehouse'''

|-

</quote>

I see this width parameter in the code for the 3rd table:

=== Morehouse ===
{|  border="2" cellpadding="3" width="%100"  .

4 Answers

+3 votes
On the Free Space Profile are some pages but none has the same content as another one.

Tables in HTML depend on many many things including the used browser …

Do you have a concrete question?
by Siegfried Keim G2G6 Mach 5 (56.9k points)
+2 votes
I am not sure about wikidata tables, but HTML tables like to size themselves to the data content. And it looks like maybe the content in the Name column is what is driving it.

You could try a <br> inside the table data, don't know if that would work or even be recognized.

Any everything is apt to change on a different browser or when you resize the window.

And we need to be using wikidata formatting (not HTML) so that makes it more difficult.

Have you tried to make Name the left column?
by Kay Knight G2G6 Pilot (601k points)
Kay,

A few days ago I had "class=wikitable" in all the table definitions, both created manually and by the wizard. NO differences.

On the other hand, I haven't swapped columns because the data was in the format as shown. By the way, has anyone noticed that the data in the first row of the test tables is the same?

Thanks all.

/s/jr
+1 vote

You can set the width of columns in wiki table markup.

For example, to set the width of the first column put something like this at the start of the row:

width="40%"|

e.g.:

{|  border="2" cellpadding="3" width="100%" 
|+ '''Morehouse'''
|-
! width="40%"|'''Cemetery Link''' !! '''Name'''
|- 

It only needs to be on one of the rows.
You can also put a width in pixels. e.g.:
 
width="100"
by Rob Pavey G2G6 Pilot (208k points)
Rob and all,

I finally decided to define my tables as:

<quote>

|  border="2" cellpadding="3" width="%100"

|+ '''Morehouse'''

|-

| width=45% | '''Cemetery Link'''

|! '''Name'''

[etc....]

/quote>

Now I'm trying to add background color to the title row, change color of characters.

/s/jr
Update!!!!

After additional testing I found I don't like the results provided by the above. Specifically, the use of the pipe character in the header. It works without throwing an error but one may not get the results one expects. The heading text will be left-aligned! Using the 'bang' (!) will provide centered heading text.

/s/jr

<quote>

! width=45%| '''Cemetery Link'''

!'''Name'''

....

</quote>

In my testing, whether using a bang or a pipe, putting the column headers did NOT provide the desired result. Maybe you can fin a way to make it work.

Also remeber that these tables are in an FSP that is public so that y'all may see what my issues have been. When I'm satisfied the FSP's privacy will be private, Trusted List only.

I've also given up on formatting color on my header row. Better uses of my time.

/s/jr
Looking at the page it looks like you have figured it out. I see the headings as centered. Let me know if you have any more questions.
Rob and all,

Check out

[[Space:PianoPlayerTableHelp|PianoPlayerTableHelp#purpose]]

It documents what I've learned about tables in the past few days. Maybe it's a start on improved table documentation ‍♂️.

I even got background colors working!

Hope y'all like my last source, ;-)

/s/jr
+1 vote

See if the information under "Cell and Column Width" on this page can give you any ideas on how to accomplish what you want. To me, it reads like your width attributes need to placed in the first cell of each column not where you currently have them in the attributes for the entire table. You might, for example, specify the first column as 33% in the first cell and the second column as 67% in the first cell to get the consistency you want from table to table.

by Nelda Spires G2G6 Pilot (564k points)

Related questions

+5 votes
2 answers
+4 votes
1 answer
+5 votes
2 answers
+4 votes
1 answer
+6 votes
0 answers
238 views asked Sep 3, 2023 in The Tree House by Kay Knight G2G6 Pilot (601k points)
+3 votes
1 answer
+3 votes
1 answer
+4 votes
1 answer
+4 votes
2 answers
158 views asked May 14, 2023 in WikiTree Help by John Porter G2G1 (1.3k points)

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

disclaimer - terms - copyright

...