Dubrovnik is very close to the ocean. It's basically about 5668 meters from the ocean depending on where you measure to the exact coastline.
If you're driving to a town near the beach or coastline, you could try Zaton (Dubrovnik-Neretva).
How far is Monterey from the ocean
How far is Newport, OR from the ocean
How far is Blacksburg, VA from the ocean
How far is Siesta Key from the ocean
How far is Paso Robles from the ocean
How far is Grand Rapids from the ocean
How far is Traverse City from the ocean
How far is Burbank, CA from the ocean
How far is Saint Paul, MN from the ocean
How far is Hallstatt from the ocean