Reputation: 203
Hi I'm working with RoR and ActiveAdmin, I have a table with different values one of then is the price, something like: 0,030 €, the problem is that in the table I see it like:
0,030
€
And I want to have it in the same row, all the prices are as long as that one(0,xxx €). So any idea about how to make a wider column? Thanks
Upvotes: 0
Views: 1132
Reputation: 35360
This can likely be fixed through CSS alone.
In /app/assets/stylesheets/active_admin.css.scss
(or equivalent) target the column with the :nth-child
selector and apply a white-space
restriction to prevent the wrapping.
For example, if it's the 2nd column you can do something like this
td:nth-child(2) {
white-space: nowrap;
}
An example of this can be seen at the link below. Notice the first column wraps, while the 2nd column is restricted to a single line (no break on the whitespace).
You will likely have to target the column/table a bit more explicitly than the generic example above, since the above will apply the styling to the 2nd column of every table the stylesheet applies to.
Upvotes: 1