Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YUI Datatable Width

This may seem like a basic question, but I'm having trouble figuring out how to set the table width to 100% on a YUI datatable.

I tried doing

#dtContainer {
    width: 100%;
}

#dtContainer table {
    width: 100%
}

but none of these approaches work.

To clarify, I am trying to set the datatable width to 100% when the table is empty and the empty message is displayed.

The generated table is an HTML table; so, I thought this should work.

like image 455
Abe Avatar asked Dec 23 '22 08:12

Abe


1 Answers

Dont use .yui-dt table { width:100%;} , It doesn't appear to set the column widths correctly. Use myDataTable.setAttributes({width:"100%"},true); after table render

like image 52
Matt Calderaro Avatar answered Dec 27 '22 02:12

Matt Calderaro