Question

I'm using displaytag tables in my portlet JSPs. The tables font size is smaller than normal (everything else in the page) and I have to increase it.

The official documentation [1] says to add some lines to the displaytag.properties file and reference a custom css.

This is my .properties file:

factory.requestHelper=org.displaytag.portlet.PortletRequestHelperFactory
basic.msg.empty_list=Nessun risultato trovato
css.tr.even=myeven
css.tr.odd=myodd
css.th.sortable=mysortable

and this is my .css:

tr.myodd {
        font-size:1.2em;
}

tr.myeven {
        font-size:1.2em;
}

th.mysortable{
        font-size:1.2em;
}

I also tried to define it as:

.myodd {
        font-size:1.2em;
}

.myeven {
        font-size:1.2em;
}

.mysortable{
        font-size:1.2em;
}

but without results, the displayed font is always smaller than expected.

The table is defined as:

<display:table class="table table-striped" [...]

Removing the class attribute does not change anything either, I still get small fonts. I should probably mention that both "table" and "table-striped" class values are from bootstrap [2] css

What am I missing?

Thanks in advance

[1] [Displaytag configuration] [2] [Bootstrap CSS]

Was it helpful?

Solution

I solved by adding style="font-size:1.2em;" as an attribute of the display:table tag

<display:table style="font-size:1.2em;" [...]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top