The HTML font that I am using in a form text box is not showing up correctly.

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered
This is the formula I am using:

<span style=\"color:blue;font-size:135%;font-weight:bold\">Elevation Consultation</span>


I would expect it to be a larger bold, blue font, but the result I get is whatever I have in the second position.  So right now it would just be a larger font.  If I put the bold statement second the result would only be bold text.

Any assistance would be appreciated.
Photo of Ben

Ben

  • 20 Points

Posted 4 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
The simple solution is to just increase your percentage till like what you get. The reason this happens is that % is a relative size and there is nesting going on - one or more elements higher up in the DOM also have a font size set in % and the factors multiply together for the inner elements. I traced this down in the old UX so I assume something similar is going on in UX2.
Photo of Ben

Ben

  • 20 Points
The issue is that all 3 criteria isn't working...only the criteria I have in the second position works...which in this case happens to be the font size.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
Welcome to the wonders of CSS! You have to debug with the Web Developer tools. Press F12 in Chrome.

Try adding !imortant

 <span style=\"color:blue;font-size:135%;font-weight:bold !imortant\">Elevation Consultation</span>
Photo of Ben

Ben

  • 20 Points
Well that helped somewhat...it did everything but color it blue.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
I get blue - send a screenshot.
UPDATE: See my attached screenshot
Photo of Ben

Ben

  • 20 Points
I actually took out the slashes and now it works.  Thank you