title: valign property of div tag?
body: <p>I have used <code>&lt;div align="center"&gt;</code> and put the image inside the div tag. Well the image is at the center but not at the middle. The image started from the top of div tag and placing at the center but I want it to be placed at the middle not at the top.</p>
  
  <p>When I googled it I found <code>&lt;td valign="middle"&gt;</code>. and its working as I intended and below is what I have designed after googling,</p>
  
  <pre><code>  &lt;div align="center" style="width:510px;height:510px;margin-left:300px"&gt;
    &lt;table style="width:510px;height:510px"&gt;
    &lt;tr&gt;
    &lt;td align="center" valign="middle"&gt;
    &lt;img id="main" src="dock.jpg" style="max-width:500px;max-height:500px"/&gt; 
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>But using a table for these purpose is it harmful ? Because I have tried <code>&lt;div align="center" style="vertical-align:middle"&gt;</code> but does not seem to work as i expected and please let me know if there is a way to do without table ?</p>