Pages ovelapping when pushing pages using navController.push(PageName)

I am pushing pages by using navController.push(PageName).
But the issue is that the pages are overlapping.
I can see that there is some problem with z-index but how can i solve it.
Example-From Homepage whose z-index 9998, i am calling navController.push(nextPage) whose z-index is 9999.Everything works fine but now when i push navController.push(nextPage2),the nextPage is overlapping nextPage2.
nextPage2 z-index is 9998.
How can i correct this because i am having multiple pages and i can’t set z-index of each page manually.