Why Static Block id is getting changed? I have sidebar block which has id "block-block-11--2". After including this statement in the node template 

&lt;div class="top-menu wrapper"&gt;
 &lt;div class='search-wrapper'&gt;";
 $search_block  = module_invoke("views","block_view","-exp-category_wise_search-page");
 print render($search_block['content']);
 &lt;/div&gt;
&lt;/div&gt;


all css of tat id is messed up, because id of that block has been changed to block-block-11. If I comment that code in node template the previous block id comes properly and all css works fine with that.Those two are entirely different blocks.

NOTE I am not trying to place same blocks at two place.

What is the issue over here? Thanks in advance.
The issue is you're not using things correctly. You should never call blocks directly from templates. Use regions in templates and add blocks to them from GUI, or you can expect IDs to get messed up. Block IDs are based on the order blocks are prepared for display (see implementation of drupal_html_id function), and each time you mess up with the block display mechanism, and go around it, their numbers may change.

If you call block directly because you need to place a block in two places, see answers to Place a block in multiple regions question. Or, if it's a Views block, simply clone block display.

To reliably style a block, you can use Block Class module to assign a class that will not change the way ID does. Alternatively, you can use answers to How to add id to a block to manually override IDs - just be careful to keep them unique if you want JavaScript to continue to work.



Note that not only IDs will get messed up when you call block directly, but also things like permissions and cache settings may get compromised.