Skip to main content
1-Visitor
January 14, 2021
Solved

How can I change the padding of the text inside a button?

  • January 14, 2021
  • 1 reply
  • 5915 views

In ThingWorx mashup, I am adding a button but I need a label very close to it. The text within the button always leave around 20px from the text to the frame, so the label looks very far away from the text inside the button. I tried to use the CSS .ptc-button and then adding padding 1px; but this padding is considering the button frame to the next widget.

 

Is there a property I can use to reduce this gap (between the text and the button frame)?  See attached file for an example.

 

Best answer by tdixit

Hi @julio.gonzalez 

 

Please check the below article if it might help

 

https://www.ptc.com/en/support/article/CS320453

 

Regards,

Toolika Dixit

1 reply

Support
January 14, 2021

Hi @julio.gonzalez.

 

Which version of ThingWorx are you running?

 

Regards.

 

--Sharon

1-Visitor
January 14, 2021

Dear Sharon,

 

Thanks for responding my cry for help! 

 

I am using release 8.5.

 

Julio

Support
January 14, 2021

Hi @JJ_01_9567198.

 

I'm not running 8.5.? but in looking at my 9.1 system, there are a few options:

 

  • Resize the button by dragging the corners
  • Use the Properties to set the desired size
  • There is an element.style group that has a margin style property.  By default this is set to 5 px but it can be reduced to 0 through CSS for both the button and the label
  • You can also try using static spacing in the layout to see if that would help

Regards.

 

--Sharon