Upvote:4
Croatia is not in the Schengen Area and a Croatian Embassy/Consulate cannot issue a Schengen visa. It can only issue a national visa which allows you to enter Croatia. To visit both Croatia and Italy per your plan, you would need a valid multiple entry Schengen visa, in this case issued by Italy, which would then let you enter Croatia, as per its visa policy.
Your other option, as pointed out by @Willeke, is to obtain two separate visas, one from each country, Croatia and Italy.