Skip to main content
Solved

Centering Title in Table Widget

  • Jul 3, 2024 9:10 AM UTC
  • 2 replies
  • 74 views

Forum|alt.badge.img+4

Hi,
This is what it is:
 

And this is how I want it to look like:
 

Seems like entering empty spaces at the beginning of the String doesn’t work. Any ideas on how to do it?

Best answer by gdiepen

One way would be to add some css that will center the h2 node holding the title

Adding the following custom css to your project:

.aimms-widget[data-widget\.uri="mydemotable"] h2.title-addon{
margin: auto;
}

seems to do the trick:

 

Note that you will have to replace the “mydemotable” in the above code with the name of your widget.

View original

2 replies

gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • Answer
  • Jul 3, 2024 10:21 AM UTC

One way would be to add some css that will center the h2 node holding the title

Adding the following custom css to your project:

.aimms-widget[data-widget\.uri="mydemotable"] h2.title-addon{
margin: auto;
}

seems to do the trick:

 

Note that you will have to replace the “mydemotable” in the above code with the name of your widget.


Forum|alt.badge.img+4
  • Author
  • Ace
  • Jul 3, 2024 12:18 PM UTC

Hi @gdiepen,

Thanks, it works. To add to this for a further reference for future, I just found out that left margin can also be customized as follows:

.aimms-widget[data-widget\.uri="mydemotable"] h2.title-addon{
margin-left: 3cm;
}

Gorkem


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator