NetTalk Central

Author Topic: h2 Header styling - trying to apply color  (Read 394 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
h2 Header styling - trying to apply color
« 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

Vinnie

  • Full Member
  • ***
  • Posts: 183
    • View Profile
    • Email
Re: h2 Header styling - trying to apply color
« Reply #1 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

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: h2 Header styling - trying to apply color
« Reply #2 on: November 21, 2024, 03:23:04 AM »
HI Vinnie,
Thanks  - I was missing the span  ... /span part of it. 
Got it working.
Ron

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: h2 Header styling - trying to apply color
« Reply #3 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.

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: h2 Header styling - trying to apply color
« Reply #4 on: Today at 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