SimplePortal

Support => English Support => Topic started by: Black Tiger on April 15, 2017, 11:13:06 PM

Title: Center block title?
Post by: Black Tiger on April 15, 2017, 11:13:06 PM
I have several blocks, Simpleportal is just great.

But now on some occasions, I would like to center the titel of a block.
For example: I create a "custom html" header block.
If I use this, I can center the text within the block using the html center and /center tags.

This however does not work for the title. I would also like the title of that block (not all header blocks) to be centered.

Is this possible, and if yes, how?
Title: Re: Center block title?
Post by: andy on April 16, 2017, 06:08:04 PM
I haven't done this but I'm sure it will work. You can try working it out, wait for someone who knows details, or search and probably find the answer on the site.


For each block, on the edit page there are Style Options (These options allow you to specify CSS styling for each blocks).
You probably need to save your own ccs file but not sure.... maybe you can add it to the simple portal css file.
You can set your own custom title style and even make your own class.


If you search for details about 'block custom styles and css', I'm sure you can find the answer - hope that helps.
Title: Re: Center block title?
Post by: Black Tiger on April 16, 2017, 06:37:28 PM
Thank you for your answer!

I did a search already but did not find anything that's why I asked the question.

However you gave a good tip and I went looking again. Completely overlooked this last time, too tired I guess.:)

I'm sure you're correct about the Style options. I tried:
position:center
align="center"
but it does not have any effect.

I thought these were correct CSS statements, but I don't know any css, I just looked up these two.
I did do another search with "block custom styles and css" and found that it's possible, but I did not find any examples.

So hopefully somebody can give me the correct code to put in there to get the title centered.
Title: Re: Center block title?
Post by: ♦ Ninja ZX-10RR ♦ on April 16, 2017, 09:52:27 PM
https://www.w3schools.com/cssref/pr_text_text-align.asp ;)
Title: Re: Center block title?
Post by: Black Tiger on April 17, 2017, 08:35:05 AM
So I just looked at the wrong website with a css example. Thank you Ninja.

For future references or for anybody else looking for this solution and not knowing any CSS like me, I had to change:

align="center"
to
text-align: center

And then it's working, it's also usable for right and left (default).
SimplePortal 2.3.8 © 2008-2024, SimplePortal