How To Center a div

<table style="margin-left: auto; margin-right: auto">
    <tr>
        <td>
            <div>Yes, CSS and I have something of a love-hate relationship. How did you guess?</div>
        </td>
    </tr>
</table>