Hey, thanks!Lumpy Burgertushie wrote: ↑Tue Sep 25, 2018 4:08 amactually, it should be :HiFiKabin wrote: ↑Mon Sep 24, 2018 5:23 pm No I didn't Frank (well, I did but I forgot :oops: ) thanks for reminding me.
Works and is AFAIK HTML5 compliantCode: Select all
<div style="text-align: center">{TEXT}</div>
you missed the semi colonCode: Select all
<div style="text-align: center;">{TEXT}</div>
robert
Code: Select all
[center]{TEXT}[/center]
Code: Select all
<div style="text-align: center;">{TEXT}</div>
centering viahrx wrote: ↑Wed Sep 19, 2018 6:59 am I know it. My code has a "span style", this is correct?
Whether simply better to use this code?Code: Select all
<span style="display: block; text-align: center;">{TEXT}</span>
Code: Select all
<div style="text-align:{CHOICE}">{TEXT}</div>
span
or div
is your choice and more a matter of taste.span
<span>
sounds useless, because <span>
is a inline html element, which means it is part of a line together with other content. Why and how would you center a part of a line? See also https://codeburst.io/block-level-and-in ... 8502c1f95b<div>
generated by another BBCode) inside a inline element, even if you use "show as block" (display: block;
) on you inline element <span>
. See https://stackoverflow.com/questions/171 ... e-elements So:
yes, if you don't bother about valid html
<div>
is a neutral container, you can put anything inside, even text or images [center]This is [center]centered[/center] text[/center]
div
, you get<div style="text-align:center">This is <div style="text-align:center">centered</div> text</div>
p
you get <p style="text-align:center">This is <p style="text-align:center">centered</p> text</p>