Posts

Showing posts with the label Width

Column Width Not Working In DataTables Bootstrap

Answer : When setting columns widths, you also need to set: autoWidth: false ...on the DataTable itself Would be nice to see your table in action, but I get a strong feeling that this is a pure matter of width of content. Elements with display: table-cell will try to expand in order to show as much as its content as possible without wrapping. For example, the width of the <th> that has the caption "Travel Protection", which you define as 10% - you would need a rather broad table to show "Travel Protection" within 10%. So overrule the default word-wrap and word-break settings for <th> like this : table.dataTable thead tr th { word-wrap: break-word; word-break: break-all; } a sort of demo (as said, cannot proof this to your table IRL) -> http://jsfiddle.net/9vbz7thp/ The best thing would be to adjust the content of the <th> 's so they fits to the hardcoded widths. If it is the content of the <td> 's tha...

Border-width In Em - But Set A Minimum Border-width

Answer : In CSS3, you can try to (ab)use the max css function, if your browser supports it. border-width: max(1px, 0.1em); border-style: solid; border-color: black; Unfortunately this awesome CSS3 feature isn't supported by any browsers yet, but I hope this will change soon! But in CSS2 – no, you can't. However, you can use JavaScript/jQuery to loop through all elements and increase the border size to 1px. But this will eat so much performance your browser is gonna crash if you have too many elements on your page (e.g. a table with more than 50-100 rows). So in other words, no it's not possible. $("[id$='ReportViewerControl']").find('*') .each(function () { if($(this).is('#ParametersRowReportViewerControl *')) return; //console.log("Processing an element"); //var cls = $(this).attr("class"); // Don't add a border to sort-arrow if ($(this).is...