Quantcast

Jump to content

» «
Photo

Table Troubles

6 replies to this topic
HalfOfAKebab
  • HalfOfAKebab

    Help & Support

  • Members
  • Joined: 01 Aug 2015
  • United-Kingdom

#1

Posted A week ago Edited by HalfOfAKebab, A week ago.

I'm having some trouble getting tables to look how I want them to.

I have this BBCode:

Spoiler


which produces this table:






abcdef
RankPlayerScoreProofDateNotes
1
2
3
4
5


However, I want to merge the cells with letters A-F into one big, long row. This is what I'm trying to make: https://i.imgur.com/Jo8nHNI.png.

How can I do this?

Craig
  • Craig

    Hostage Stamp

  • Moderator
  • Joined: 14 Sep 2007
  • None
  • Best Writer 2011
    Time Traveller Of The Year 1984

#2

Posted A week ago

The only way I've been able to do this is by removing all the title header cells and replacing it with a really long cell title that covers up the extra room.

 

Spoiler

 

Unfortunately, as you can see, this doesn't cover the entire span of the title and instead enlarges the first column's title. This is handy and quite clean if you've more information to add other than numbering, but it doesn't really do what you're asking. I'm not so hot on tables and I'm fairly sure they're a touch broken on this forum's build.

 

Apologies too for the massive gap when you reveal the spoiler. I'm not sure how to fix that, the formatting is correct on my end.

  • HalfOfAKebab likes this

HalfOfAKebab
  • HalfOfAKebab

    Help & Support

  • Members
  • Joined: 01 Aug 2015
  • United-Kingdom

#3

Posted A week ago

Spoiler

Yeah, this isn't really what I'm asking for unfortunately.

Apologies too for the massive gap when you reveal the spoiler. I'm not sure how to fix that, the formatting is correct on my end.

That's also a problem I'm having with some other tables. Anyone know how to fix this, too?

Great Britain
  • Great Britain

    Dieu et mon droit

  • Members
  • Joined: 03 Mar 2017
  • United-Kingdom

#4

Posted A week ago

Did you try to find something in this discussion that might help by any chance?

 

http://gtaforums.com...-tables-sistem/


GTAKid667
  • GTAKid667

    The Bad Fella™

  • Leone Family Mafia
  • Joined: 24 May 2010
  • United-Kingdom
  • Most Helpful [GTA] 2013
    Contribution Award [Chain Game]
    Contribution Award [GTA III]

#5

Posted A week ago

Apologies too for the massive gap when you reveal the spoiler. I'm not sure how to fix that, the formatting is correct on my end.

That's also a problem I'm having with some other tables. Anyone know how to fix this, too?

Yeah there's a few issues with the table coding on the forum as Craig mentioned earlier. These large spaces seem to be automatically created by the post editor when you click post, even though the code you've written is correct. And the larger the table is, the bigger the gap above the table ends up being...

There is a way to fix this though! You need to remove the line breaks between each line of code, so that the code is continuously running as one long sentence. The only exception to this is if you have line breaks in the actual content you've included a cell, you can keep those as that won't affect anything.

So for the example you've written in the opening post, removing the line breaks like this:
[table][tr][th]a[/th][th]b[/th][th]c[/th][th]d[/th][th]e[/th][th]f[/th][/tr][tr][th]Rank[/th][th]Player[/th][th]Score[/th][th]Proof[/th][th]Date[/th][th]Notes[/th][/tr][tr][td]1[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr][td]2[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr][td]3[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr][td]4[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr][td]5[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][/table]
Displays the table without any gaps above, like this:
abcdef
RankPlayerScoreProofDateNotes
1
2
3
4
5


Obviously the issue with this is the code becomes a bit of a mess to read, so I'd recommend keeping a copy of the code saved on your device in a more readable format and then repeat the process every time you update the table (update it on your saved file, then remove the line breaks and edit it into your post).

I'm not too sure about the original question you have about merging cells, unfortunately, but I'll look into it and if I find out a way of doing it I'll let you know. Theoretically you could create a separate one cell table before the actual table, if you just want the top row merged, but then you'll need to include space either side of the title to keep the cell width the same as the table below it.

Hope that helps :)
  • RedDagger and HalfOfAKebab like this

HalfOfAKebab
  • HalfOfAKebab

    Help & Support

  • Members
  • Joined: 01 Aug 2015
  • United-Kingdom

#6

Posted A week ago

Theoretically you could create a separate one cell table before the actual table, if you just want the top row merged, but then you'll need to include space either side of the title to keep the cell width the same as the table below it.

I'm not quite sure what you mean by this. Could you provide an example?

Thanks a lot for the gap fix!

GTAKid667
  • GTAKid667

    The Bad Fella™

  • Leone Family Mafia
  • Joined: 24 May 2010
  • United-Kingdom
  • Most Helpful [GTA] 2013
    Contribution Award [Chain Game]
    Contribution Award [GTA III]

#7

Posted A week ago

I'm not quite sure what you mean by this. Could you provide an example?

Sure. You'd just need to make a completely seperate table that only has one header cell, such as this code:
[table][tr][th][center]abcdef[/center][/th][/tr][/table]
Then you can remove the code for the first row of the table in your original code example above (the first set of [tr][/tr] tags) and paste that directly afterwards in a continued sentence to prevent the gap as I mentioned before, so the code will now look like this - two tables written together:
[table][tr][th][center]abcdef[/center][/th][/tr][/table][table][tr][th]Rank[/th][th]Player[/th][th]Score[/th][th]Proof[/th][th]Date[/th][th]Notes[/th][/tr][tr][td]1[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr][td]2[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr][td]3[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr][td]4[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr][td]5[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][/table]
The issue then is that the first table of the two, that is only one cell including the 'abcdef' content, will not be as wide as the table below it as it will only create enough room to display those letters. My suggestion above was that you could create spaces either side of the text using the spacebar, but this is actually not possible from what I've just found out testing it.

So instead there is another alternative. What you can do instead is type random characters either side of the text, making sure there is an equal amount of them on both sides to center the 'abcdef', although you may need to do an extra character on one side if it doesn't quite line up, and then colour that text to the same colour as the table header (colour code 1B2A36). Here's an example of the same line from the beginning of this post, the one cell table, with underscores written either side that are coloured to blend in to the background:

[table][tr][th][center][color=1B2A36]_______________[/color]abcdef[color=1B2A36]______________[/color][/center][/th][/tr][/table]
Now, using that line instead of the original and then the rest of the table pasted straight afterwards like in the second code example, we get this:

_______________abcdef______________

RankPlayerScoreProofDateNotes
1
2
3
4
5


It's not the most convenient thing in the world, but a decent fix to get the kind of result you're looking for. If there's anything else that's still not clear, please let me know :)
  • RedDagger likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users