When I am using following style then everything works properly.
<style>
            table{
                border: 0.5px solid black;
                border-collapse: separate;
                border-spacing: 0;
            }
            </style>
But when Im using class, code is not working.
<style>
            .tableWithOuterBorder{
                border: 0.5px solid black;
                border-collapse: separate;
                border-spacing: 0;
            }
            </style>
Following are my details code.
$htmlData   =   "<html><head>";
                $htmlData   .=  "<style>
                .tableWithOuterBorder{
                    border: 0.5px solid black;
                    border-collapse: separate;
                    border-spacing: 0;
                }
                </style>";
                $htmlData   .=  "</head><body>";
                $htmlData   .=  "<table class='tableWithOuterBorder'><tr><td>Hello</td><td>Sir</td></tr></table>";
                $htmlData   .=  "</body></html>";
        $pdf->writeHTML($htmlData, true, false, false, false, '');
What is wrong in my code?
 
    