cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

monospace font in textarea widget

abuzzi
2-Guest

monospace font in textarea widget

Hello,

I'm using ThingWorx 8.2 and in a meshup I defined a textarea that should use monospace font (ie: Courier).

 

So in "New Composer" I set textarea's CustomClass=abFont and in Custom CSS I defined:

.abFont {
    font-family: Courier !important;
}

 

However when I save and preview the meshup I see that abFont is applied to the outer bounding-box.

 

The font information is however overrided between such outer bounding-box and the inner textarea where the font is supposed to be monospaced...

 

Screen Shot 2018-04-20 at 09.26.31.png

 

How can I fix this ?

 

Thank you,

A.

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for including the page source with your question, that really helps.

 

Have you seen this guide to CSS:Style UI with CSS>Apply Custom Class to Widget

 

I think you need to add

.widget-textarea textarea

to your class, making your class look like this

.abFont .widget-textarea textarea {
    font-family: Courier;
}

I don't think the !important does anything

 

View solution in original post

2 REPLIES 2

Thanks for including the page source with your question, that really helps.

 

Have you seen this guide to CSS:Style UI with CSS>Apply Custom Class to Widget

 

I think you need to add

.widget-textarea textarea

to your class, making your class look like this

.abFont .widget-textarea textarea {
    font-family: Courier;
}

I don't think the !important does anything

 

Hello alsmith,

 

what you say does really make sense and even more important.. it works!

 

Thank you so much,

Andrea

Top Tags