Hemmed into a narrow coastal strip between the Rokko Mountains and the Inland Sea , this port city came into its own after American pressure forced Japan to open to foreign trade in 1868 .
Before 1868 , the port was closed to foreign boats .