Adding and sizing tables

Yorky

RIP 21/01/2024
Joined
3 Oct 2016
Local time
12:49 PM
Messages
16,220
I wish to include a table in a post. When I click on the "table widget" (top right) I am given the option for how many rows and columns. Let's say I want a two column, two row table.

71330


71331



The table is as wide as my browser page (on my laptop) which is acceptable but I would like the first column to be 25% wide and the second column to be 75% wide.

Can this be done?
 
Last edited:
I wish to include a table in a post. When I click on the "table widget" (top right) I am given the option for how many rows and columns. Let's say I want a two column, two row table.


The table is as wide as my browser page (on my laptop) which is acceptable but I would like the first column to be 25% wide and the second column to be 75% wide.

Can this be done?
Sadly no.

The table feature was new with the XF1 to XF2 upgrade. I can put in a feature request but unless plenty of others also request it, what you see is what we have currently.

That is unless you know how to code it in bbcode code... if you do then you're away but I'd have to do a lot off investigation to even see if it was possible. It must be, but I have no idea how. My html coding isn't really existent...
 
Last edited:
Sadly no.

The table feature was new with the XF1 to XF2 upgrade. I can put in a feature request but unless plenty of others also request it, what you see is what we have currently.

That is unless you know how to code it in html code... if you do then you're away but I'd have to do a lot off investigation to even see if it was possible. It must be, but I have no idea how. My html coding isn't really existent...

Thanks for the quick response. I know a little about html code (a lot more than I know about PHP which is zero). I'll have a look at it.
 
SatNavSaysStraightOn

This is the html code for inserting a 2 x 2 table centralised with columns 228px and 766px wide. The alignment specification is for text or images to be inserted into the table.

<table
style="text-align: left; width: 1000px; margin-left: auto; margin-right: auto;"
border="0" cellpadding="0" cellspacing="0">

<tbody>
<tr>
<td style="vertical-align: top; width: 228px;"><br>
</td>
<td style="vertical-align: top; width: 766px;"><br>
</td>
</tr>
<tr>
<td style="vertical-align: top; width: 288px;"><br>
</td>
<td style="vertical-align: top; width: 766px;"><br>
</td>
</tr>

</tbody>
</table>


I have no idea why the two column widths do not add up to 1000.

I've inserted a couple of images in the OP. The first one is 400px wide, the second is 600px wide. The table has automatically sized to accommodate them.

I shall conduct a few more experiments later.
 
Last edited:
I have no idea why the two column widths do not add up to 1000.
There may be padding pixels between the column that's need taking into account...
Plus you need BBCODE not html code, my mistake, sorry...

But it is similar..

Code:
[TABLE]
[TR]
[TD][/TD]

[TD][/TD]
[/TR]
[TR]
[TD][/TD]

[TD][/TD]
[/TR]
[/TABLE]
 
There may be padding pixels between the column that's need taking into account...
Plus you need BBCODE not html code, my mistake, sorry...

But it is similar..

Code:
[TABLE]
[TR]
[TD][/TD]

[TD][/TD]
[/TR]
[TR]
[TD][/TD]

[TD][/TD]
[/TR]
[/TABLE]

I am pushing it keeping up with the English language and a smattering of Thai. On top of that Basic and HTML are about my limit. Any more will do nothing but confuse me.
 
I am pushing it keeping up with the English language and a smattering of Thai. On top of that Basic and HTML are about my limit. Any more will do nothing but confuse me.
I know what you mean. Working in a boarding school with a lot of international students, i used to understand British English spoken with a Chinese accent or Vietnamese accent... fast forward 10 years or so and trying to understand English spoken by a Chinese person with an Australian accent and it's a completely different ball game...

From what I have been reading, it would appear that we are not going to be able to control table sizes very easily or at all.
It would appear that XF simply doesn't understand additional table bb code commands. They are hard coded into the template that is used for reply and thread creation. Even the 100% width is programmed in and whilst I can reprogram it, I have to set a new value that applies for every post and every person across the entire forum. I can't change it... so I could say that the table is going to have a maximum width of 800 pixels, but it would still auto width the columns distributing them equally within those 800 pixels which gets us nowhere at all.

Sorry
 
I know what you mean. Working in a boarding school with a lot of international students, i used to understand British English spoken with a Chinese accent or Vietnamese accent... fast forward 10 years or so and trying to understand English spoken by a Chinese person with an Australian accent and it's a completely different ball game...

From what I have been reading, it would appear that we are not going to be able to control table sizes very easily or at all.
It would appear that XF simply doesn't understand additional table bb code commands. They are hard coded into the template that is used for reply and thread creation. Even the 100% width is programmed in and whilst I can reprogram it, I have to set a new value that applies for every post and every person across the entire forum. I can't change it... so I could say that the table is going to have a maximum width of 800 pixels, but it would still auto width the columns distributing them equally within those 800 pixels which gets us nowhere at all.

Sorry

Thanks for trying. I suppose that we could control column width with "blank images" although that is a bit of a hassle. Better to use a spreadsheet page converted to .jpeg, I guess.
 
Back
Top Bottom