TinyPortal

Development => Support => Topic started by: davejo on February 24, 2022, 10:09:58 AM

Title: html code in blocks
Post by: davejo on February 24, 2022, 10:09:58 AM
SMF2.1.1
TP2.2.1
Site: www.quizland.co.uk
SMF defaut theme as well as others.

On the front page I have a welcome block. Inside the block are various images and text, some of which is html code for styling etc.

The issue I'm having is that although the font seems to be correct, no matter what I do I cannot get the font colour to work.

This is a line of code that should be coloured.

<h1 style="text-align: center; color:blue; font-size: 15px; font-family:Helvetica, sans-serif;"><strong>Thank you for coming to see us, we hope you enjoy your stay</strong></h1>

regards

Dave
Title: Re: html code in blocks
Post by: @rjen on February 24, 2022, 02:21:50 PM
Check the sstyles with the inspection tool...

The < strong > element has a color  setting attached that overwrites the blue...
This will work:


<h1 style="text-align: center; font-size: 15px; font-family:Helvetica, sans-serif;"><strong><span style="color:blue;">Thank you for coming to see us, we hope you enjoy your stay</span></strong></h1>


even better:

<h1 style="text-align: center; color:blue; font-size: 15px; font-family:Helvetica, sans-serif;">Thank you for coming to see us, we hope you enjoy your stay</h1>


The strong is not needed at all: h1 is bold by itself...
Title: Re: html code in blocks
Post by: davejo on February 24, 2022, 03:40:26 PM
You've done it again @rjen thank you very much  O0