Trains are a popular mode of transport in Croatia. There are several trains a day between the major towns and in comparison with Western Europe, tickets are usually less expensive. Zagreb, Istria, Kvarner and down to Split are quite well connected by train.
You can find some local Croatian train timetables here: Croatia Trains
Bookings for Croatia Trains and International Trains to and from Croatia can be made online here with Rail Plus:
Train is a great option between Ljubljana (Slovenia) and Zagreb (Glavni Kolodvor station) or Ljubljana and Rijeka (Northern Croatia), it takes around 2.5hrs.