Hi,
It does not come from the PHP. We need to see the result HTML content.
You have a HTML result error so we have to know which is this content is order to understand which element could be the source of this problem. After that we may look at the PHP part.
The DOM inspector is not the source code because it will hide you some errors and try to fix the DOM like it could. And as you see, it do it wrong because the design of your page is broken.
Having a link to your website could be a good first step but unfortunately, you're still under localhost.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.