'center' tag in phpbb3 :<

Get help developing custom BBCodes or request one.
Post Reply
Rika
Registered User
Posts: 1
Joined: Thu Sep 13, 2018 8:46 pm

'center' tag in phpbb3 :<

Post by Rika » Thu Sep 13, 2018 8:55 pm

Why does not the 'center' tag work?

Did not work:

Code: Select all

[center] {TEXT} [/center]

[centre] {TEXT} [/centre]

<center>{TEXT}</center>

<div align="center">{TEXT}</div> 
How to make the 'center' tag work?

User avatar
AbaddonOrmuz
Registered User
Posts: 373
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: 'center' tag in phpbb3 :<

Post by AbaddonOrmuz » Fri Sep 14, 2018 12:46 am

<center> is no longer supported in HTML5.

BBCode template:

Code: Select all

[center]{TEXT}[/center]
HTML replacement:

Code: Select all

<div style="text-align:center">{TEXT}</div>
I'm using the following, it might help you:

BBCode template:

Code: Select all

[align={CHOICE=left,right,center,justify;defaultValue=left}]{TEXT}[/align]
HTML replacement:

Code: Select all

<div style="text-align:{CHOICE}">{TEXT}</div>
Example:

Code: Select all

[align=center]Centered text[/align]
A proudly user of Arch Linux :: /r/sddm_themes

hrx
Registered User
Posts: 190
Joined: Wed Nov 18, 2015 11:21 am

Re: 'center' tag in phpbb3 :<

Post by hrx » Tue Sep 18, 2018 6:51 pm

This code for centring is correct? The code works correctly in my forum.

Code: Select all

[centre]{TEXT}[/centre]

<span style="display: block; text-align: center;">{TEXT}</span>

User avatar
Lumpy Burgertushie
Registered User
Posts: 64877
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: 'center' tag in phpbb3 :<

Post by Lumpy Burgertushie » Tue Sep 18, 2018 10:25 pm

point is that phpbb does not come with a center bbcode at all. you do have to create one yourself. the posts above show you how.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

hrx
Registered User
Posts: 190
Joined: Wed Nov 18, 2015 11:21 am

Re: 'center' tag in phpbb3 :<

Post by hrx » Wed Sep 19, 2018 6:59 am

I know it. My code has a "span style", this is correct?

Code: Select all

<span style="display: block; text-align: center;">{TEXT}</span>
Whether simply better to use this code?

Code: Select all

<div style="text-align:{CHOICE}">{TEXT}</div>

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3154
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: 'center' tag in phpbb3 :<

Post by HiFiKabin » Wed Sep 19, 2018 9:43 am

This is what I use

Code: Select all

[Center]{TEXT}[/Center]

Code: Select all

<div align="center">{TEXT}</div>

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 9 guests

cron