Rahul Rahul - 3 months ago 36
CSS Question

display:none with angular datatables

I have a table which should be hidden when the page loads and is shown only on selection of a checkbox.

<table width="100%" id="C" datatable="ng" dt-options="dtOptionsfeature" class="celltable" style="display: none;">


I also tried it in css file

#C {

display: none;
}


It works if i remove the data tables . So can i not use css styling with data tables ? because other properties are working.

Answer

Try to hide table parent container

<div id="hide-table"><table width="100%" id="C" datatable="ng" dt-options="dtOptionsfeature" class="celltable" style="display: none;"></div>

#hide-table{display:none;}