Skip to main content
Solved

Centering Title in Table Widget

  • July 3, 2024
  • 2 replies
  • 32 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.

2 replies

gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • Answer
  • July 3, 2024

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
  • July 3, 2024

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