NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: rjolda on November 20, 2024, 04:43:37 PM

Title: h2 Header styling - trying to apply color
Post by: rjolda on November 20, 2024, 04:43:37 PM
Hi,
I am trying to apply red color to the h2 header  - I tried in-line styling which did not work.  I want the header h2 line to always be red at the top of the page.
Anyone done this and willing to share?
Thanks,
Ron
Title: Re: h2 Header styling - trying to apply color
Post by: Vinnie on November 21, 2024, 12:14:40 AM

'<h2><span style="color: red;">This is a test Heading which needs to be red.</span></h2>'

If you are adding this  to a NetWeb Form as the heading you need to check

Allow XHTML in Heading
Title: Re: h2 Header styling - trying to apply color
Post by: rjolda on November 21, 2024, 03:23:04 AM
HI Vinnie,
Thanks  - I was missing the span  ... /span part of it. 
Got it working.
Ron
Title: Re: h2 Header styling - trying to apply color
Post by: Jane on November 21, 2024, 10:12:38 AM
Of course, if you want ALL h2 elements in your app to be red it's easiest to put a line into your custom.css file


Code: [Select]
h2{color:red;}
Remember that it doesn't take a period or hash mark before the h2 designation.
Title: Re: h2 Header styling - trying to apply color
Post by: rjolda on November 22, 2024, 02:23:41 AM
THanks Jane,
I kept trying it with a .h2 and .<h2> , etc and could not get it to work in my custom css.  In line worked once I added the span tag. 
Thanks for the help on getting this in my custom css.
Ron