Force p:dataTable to use container width while "width: auto"

UI Components for JSF
Post Reply
hpmt
Posts: 1
Joined: 22 Aug 2016, 08:14

22 Aug 2016, 08:29

I have a p:datatable inside a container. I need the datatable to use container width. When width is set to automatic (style="width : auto;"), databable only take about half the width of container when viewed using a bigger screen.

I can set style="width : 100%;". But then when the page viewed in smaller mobile screens table does not display properly. (Because width is not auto).

What I need is a way to force the datatable to use full container width while adjusting the column width automatically depending on the screen size.

Is there a way to do this?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests