title: mPDF and dynamic centering
body: <p>I've just started using mPDF instead of FPDF and, well... I'm facing one serious difficult that concerns my project.</p>
  
  <p>I want to set set DIV in which any content, usually dynamically generated (ie. MySQL data), has to be centered, independent of its size. Unfortunately, having gone through only a few solutions from StackOverflow, I can't do that.</p>
  
  <p>I tried to do that with:</p>
  
  <pre><code> margin-right:auto;
   margin-left:auto;
   width: 80%;
  </code></pre>
  
  <p>but the entire DIV is stretched and it just floats from corner to corner. Text can't get centered at any try... center tag just doesn't work, which is the worst flaw in mPDF's handling of HTML code.</p>
  
  <p>Does anybody have any ideas on how to dynamically center any image or text, no matter what size or length it is?</p>
  
  <p>Thanks for help!</p>