How to adjust the display order The HTML structure is the following one:

   &lt;div id="contentp"&gt;
     &lt;p&gt;.........&lt;/p&gt;
     &lt;p&gt;.........&lt;/p&gt;
     &lt;div id="rate-node-18-1-1" class="rate-widget rate-widget-1 clear-block rate-processed"&gt;...&lt;/div&gt;
   &lt;/div&gt;&lt;!--contentp  end ----!&gt;


The part between &lt;div id="contentp"&gt; and &lt;/div&gt; &lt;!--contentp  end ----!&gt; is generated in node.tpl.php by the following snippet: 

  &lt;div id="contentp"&gt;
      &lt;?php print $content; ?&gt;
  &lt;/div&gt;


The  &lt;div id="rate-node-18-1-1"&gt; part is generated by the rate module.

I want to put the &lt;div id="rate-node-18-1-1"&gt;...&lt;/div&gt; part outside of the &lt;/div&gt; &lt;!--contentp end ----!&gt;.

How I should do it?
Since Fivestar actually appends its markup to the bottom of the node's content (instead of using Links, for example), its a bit more tricky.

Ideally you would create a seperate node template for your content type, ie: node-story.tpl.php or something like that (depends on your theme).

Once you have a node template you can safely edit, do the following at the top:

&lt;?php
$my_node_content = $node-&gt;content['body']['#value'];
$my_fivestar_widget = $node-&gt;content['fivestar_widget']['#value'];
?&gt;


Then, instead of &lt;?php print $content; ?&gt;, do: &lt;?php print $my_node_content; ?&gt;

This way, only your node's actual body content will be printed out.

Then, wherever you want, just print out the fivestar widget code!

Here's what it would look like using your markup:

&lt;div id="contentp"&gt;
  &lt;?php print $my_node_content; ?&gt;
&lt;/div&gt;&lt;!--contentp  end ----!&gt;

&lt;div id="my_fivestar_container"&gt;
  &lt;?php print $my_fivestar_widget; ?&gt;
&lt;/div&gt;&lt;!--my_fivestar_container end ----!&gt;