NATION

PASSWORD

Can't center both tables and contents of those tables

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
The Celestial Founder
Civil Servant
 
Posts: 7
Founded: Jul 02, 2021
Ex-Nation

Can't center both tables and contents of those tables

Postby The Celestial Founder » Fri Nov 04, 2022 6:15 pm

So, I'm trying to build a table for my region's Gameplay embassy showing off our government and a few other things. I want to align the contents of the table centered, as well as the table itself, but if you do that, sure, the table center-aligns, but you end up with this wonky result:

This align doesn't work
This align works

Any way this could be fixed or, if there's a work-around, could I get that work-around?
Last edited by United Calanworie on Fri Nov 04, 2022 9:25 pm, edited 3 times in total.
This nation is not regularly checked for telegrams - send all telegrams to Ryzalia, Celestial Empress of The Phoenix Imperium.

User avatar
The Hurricane
Chargé d'Affaires
 
Posts: 420
Founded: Mar 02, 2022
Corporate Bordello

Postby The Hurricane » Fri Nov 04, 2022 6:22 pm

The Celestial Founder wrote:So, I'm trying to build a table for my region's Gameplay embassy showing off our government and a few other things. I want to align the contents of the table centered, as well as the table itself, but if you do that, sure, the table center-aligns, but you end up with this wonky result:

This align doesn't work
This align works
Any way this could be fixed or, if there's a work-around, could I get that work-around?


Remove [align]'s that's outside the [table].
Last edited by The Hurricane on Fri Nov 04, 2022 6:35 pm, edited 1 time in total.

User avatar
The Celestial Founder
Civil Servant
 
Posts: 7
Founded: Jul 02, 2021
Ex-Nation

Postby The Celestial Founder » Fri Nov 04, 2022 6:28 pm

The Hurricane wrote:
The Celestial Founder wrote:So, I'm trying to build a table for my region's Gameplay embassy showing off our government and a few other things. I want to align the contents of the table centered, as well as the table itself, but if you do that, sure, the table center-aligns, but you end up with this wonky result:

This align doesn't work
This align works
Any way this could be fixed or, if there's a work-around, could I get that work-around?


Remove [align]'s that's outside the [table].

That doesn't work, though, because then the table isn't center-aligned.
This nation is not regularly checked for telegrams - send all telegrams to Ryzalia, Celestial Empress of The Phoenix Imperium.

User avatar
The Hurricane
Chargé d'Affaires
 
Posts: 420
Founded: Mar 02, 2022
Corporate Bordello

Postby The Hurricane » Fri Nov 04, 2022 6:41 pm

I don't think you can.

I used [tab=500] and it did not help.

User avatar
The Celestial Founder
Civil Servant
 
Posts: 7
Founded: Jul 02, 2021
Ex-Nation

Postby The Celestial Founder » Fri Nov 04, 2022 8:41 pm

Well, that's an ouch. Guess I get to try and make it with [float] and [box] tags.
This nation is not regularly checked for telegrams - send all telegrams to Ryzalia, Celestial Empress of The Phoenix Imperium.

User avatar
Sandaoguo
Diplomat
 
Posts: 541
Founded: Apr 07, 2013
Left-Leaning College State

Postby Sandaoguo » Fri Nov 04, 2022 8:51 pm

Well, whatever you've done here has broken the forum layout.

There's no combination of existing bbcode that will horizontally center a table and the content inside of it. A combination of box, floatleft, and floatright codes can come close to mimicking a table, but each both will be on its own line. NS bbcode isn't sophisticated enough to allow floating elements on the same line. I'm not sure it's even possible with phpBB's bbcode parser.

Tables are notoriously difficult to implement in bbcode. The parser is getting confused by nesting so many HTML elements (div > table > row > cell > div).
Last edited by Sandaoguo on Fri Nov 04, 2022 8:58 pm, edited 4 times in total.

User avatar
United Calanworie
Technical Moderator
 
Posts: 3870
Founded: Dec 12, 2018
Democratic Socialists

Postby United Calanworie » Fri Nov 04, 2022 9:26 pm

Please do not try to center tables. You will only break the forums. I edited your OP's BBCode to unbreak them.
Trans rights are human rights.
||||||||||||||||||||
Discord: Aav#7546 @queerlyfe
She/Her/Hers
My telegrams are not for Moderation enquiries, those belong in a GHR. Feel free to reach out if you want to just chat.

User avatar
The Celestial Founder
Civil Servant
 
Posts: 7
Founded: Jul 02, 2021
Ex-Nation

Postby The Celestial Founder » Sat Nov 05, 2022 1:57 pm

Yeah, it'd probably have to be done with some custom code. I'm betting that the NS forums use <div style="text-align: center;"> for the center tag. A better suggestion would be to use <div align="center">, as that would allow tables to be centered without breaking things. Either way, I figured out an alternative solution.
Last edited by The Celestial Founder on Sat Nov 05, 2022 1:58 pm, edited 1 time in total.
This nation is not regularly checked for telegrams - send all telegrams to Ryzalia, Celestial Empress of The Phoenix Imperium.


Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: DuQland, Fauzjhia, Kractero, Legio II Gemina, Lorasia, Mr TM, New Westmore

Advertisement

Remove ads