[SalesForce] HTML table does not let me change table position to center when rendering as PDF

I'm trying to display my HTML table in the center of the page when rendering it as pdf. When I render as HTML it works as expected so I assume that CSS properties for alignment doesn't work properly in pdf. Any help on this is appreciated!

My VF Component is embedded in a VF page as below:-

**COMPONENT**
table.heatmapWrapper{
    border-collapse: collapse;
    width: 500px;
    height: 500px;
    table-layout: auto;
    text-align:c

    <apex:form >
            <apex:outputPanel layout="none">
            <div style="text-align:center; width:100%;" >
            <table class="heatmapWrapper" text-align="center"> <!--style="/*width:{!width}; height:{!height};*/margin: 0 auto !important;"-->

**VF PAGE**
<apex:outputPanel layout="none" rendered="{!showAggregatedHeatMap}">
           <!--  <div style="page-break-after:always;"></div> -->
            <c:DrawHeatmap heatmap="{!heatmap}" safeMode="true" height="500px" width="100%" disableRiskList="true" showRiskIds="true"/>
        </apex:outputPanel>

Best Answer

The PDF render engine doesn't like inline styles and if you are using css styles, you need create a static resource with the .css and in the visualforce load de css

<apex:stylesheet value="{!URLFOR($Resource.MYStyless, 'vfStyles.css')}"/>