Code on desktop does not work for mobile

I have written a code for desktop site and the same for mobile but some elements do not follow the code written for it? What could be the possible solution to it?

Could you be a little bit more specific, as in which elements do you use (e.g. multi-stage form) and exactly what code doesn’t work?