RolePlay onLine RPoL Logo

, welcome to Beginners

06:34, 27th April 2024 (GMT+0)

Centering a table in my post

Posted by Jhaelin
Jhaelin
member, 32 posts
Tue 15 Aug 2023
at 00:03
  • msg #1

Centering a table in my post

I have the following table in my post.  I have followed the RUBB code listed int he HELP page exactly and it just does not center on the page.  What am I doing wrong?

<center>
<table width="55%">
<tr><th>DESC./TRADE CODE</th><th>SKILL GAINED AT RANK 0</th></tr>
<tr><th align="right">Agricultural:</th><td>Animals</td></tr>
<tr><th align="right">Asteroid:</th><td>Zero-G</td></tr>
<tr><th align="right">Desert:</th><td>Survival</td></tr>
<tr><th align="right">Fluid Oceans:</th><td>Seafarer</td></tr>
<tr><th align="right">Garden:</th><td>Animals</td></tr>
<tr><th align="right">High Technology:</th><td>Computers</td></tr>
<tr><th align="right">High Population:</th><td>Streetwise</td></tr>
<tr><th align="right">Ice-Capped:</th><td>Vacc Suit</td></tr>
<tr><th align="right">Industrial:</th><td>Trade</td></tr>
<tr><th align="right">Low Technology:</th><td>Survival</td></tr>
<tr><th align="right">Poor:</th><td>Animals</td></tr>
<tr><th align="right">Rich:</th><td>Carouse</td></tr>
<tr><th align="right">Water World:</th><td>Seafarer</td></tr>
<tr><th align="right">Vacuum:</th><td>Vacc Suit</td></tr>
</table>
</center>
Kitsunelord43
member, 29 posts
Loves to play a bard
Mediocre DM
Tue 15 Aug 2023
at 00:43
  • msg #2

Re: Centering a table in my post

When I quoted it, I just removed the [*code] parts to get the table to work


DESC./TRADE CODESKILL GAINED AT RANK 0
Agricultural:Animals
Asteroid:Zero-G
Desert:Survival
Fluid Oceans:Seafarer
Garden:Animals
High Technology:Computers
High Population:Streetwise
Ice-Capped:Vacc Suit
Industrial:Trade
Low Technology:Survival
Poor:Animals
Rich:Carouse
Water World:Seafarer
Vacuum:Vacc Suit


This message was last edited by the user at 00:44, Tue 15 Aug 2023.
Jhaelin
member, 33 posts
Tue 15 Aug 2023
at 01:18
  • msg #3

Centering a table in my post

But the table is not center of the posting page...
nauthiz
subscriber, 772 posts
Tue 15 Aug 2023
at 01:59
  • msg #4

Centering a table in my post

I think the <center></center> tags are strictly for text.

Tables I think default to left alignment, or you can put them to the right.


DESC./TRADE CODESKILL GAINED AT RANK 0
Agricultural:Animals
Asteroid:Zero-G
Desert:Survival
Fluid Oceans:Seafarer
Garden:Animals
High Technology:Computers
High Population:Streetwise
Ice-Capped:Vacc Suit
Industrial:Trade
Low Technology:Survival
Poor:Animals
Rich:Carouse
Water World:Seafarer
Vacuum:Vacc Suit



If you want it "centered" so the data columns are approximately in the middle of the page, I think your best bet is to just make it 100% width, and maybe do some empty columns to pad either side.


                     DESC./TRADE CODESKILL GAINED AT RANK 0                     
Agricultural:Animals
Asteroid:Zero-G
Desert:Survival
Fluid Oceans:Seafarer
Garden:Animals
High Technology:Computers
High Population:Streetwise
Ice-Capped:Vacc Suit
Industrial:Trade
Low Technology:Survival
Poor:Animals
Rich:Carouse
Water World:Seafarer
Vacuum:Vacc Suit


Jhaelin
member, 34 posts
Tue 15 Aug 2023
at 02:44
  • msg #5

Centering a table in my post

This is the table listed in the RUBB Code under advanced tables and centering it...

<center>
<table width="55%">
<tr><th>Table Example</th></tr>
</table>
<table width="55%">
<tr><th>Heading 1</th><th>Heading 2</th></tr>
<tr><td>Content Row 1 Column 1</td><td>Content Row 1 Column 2</td></tr>
<tr><td>Content Row 2 Column 1</td><td>Content Row 2 Column 2</td></tr>
</table>
<table width="55%">
<tr><td><small>* table footnote</small></td></tr>
</table>
</center>

Yields:


Table Example

Heading 1Heading 2
Content Row 1 Column 1Content Row 1 Column 2
Content Row 2 Column 1Content Row 2 Column 2

* table footnote


Maybe its this r.rpol.net beta site I use.  I have not tried it on the "classic" rpol.net
1492
member, 134 posts
I like monkeys
Tue 15 Aug 2023
at 03:01
  • msg #6

Re: Centering a table in my post

Jhaelin:
Maybe its this r.rpol.net beta site I use.  I have not tried it on the "classic" rpol.net

It may indeed be a beta site issue, because I only use classic, and Kitsunelord43's table (above) is centered on my screen.
Jhaelin
member, 35 posts
Tue 15 Aug 2023
at 03:11
  • msg #7

Centering a table in my post

Ah, that solves it then... thank you all for your input!
nauthiz
subscriber, 773 posts
Tue 15 Aug 2023
at 03:17
  • msg #8

Centering a table in my post

Today I learned!

I've been using the responsive site for so long I sometimes forget there are technical differences between the two that can really make a difference in the user experience.
Sign In