Take tram 2 in the direction Nouveau Bassin and get off at the stop Lefabvre. There change to a bus 22 in the direction Rixheim/CentreNautique (goes every half an hour, better check it) and get off at the stop Berne or CentreCommercial, by the Carrefour shopping centre. Walk 5 minutes north and you will find a bridge with the entrances to the motorway in both directions. Going towards Dijon, better choose the spot on the left. Going east Mirto got a ride from here directly to Prague.
If you are going west, accept a lift at least to the big service station Porte d'Alsace, where it's easy to get a long-distance lift. Don't get off at the first péage west of Mulhouse, as the staff don't tolerate hitchhikers and there are many police there.
If you ever get dropped to the last exit before the toll station Porte d'Alsace because your driver doesn't want to pay a toll, don't try going right back on the highway. Instead, try to get to Belfort using the smaller road D83G (here worked great for me ; GPS 47.728321, 7.165370) and get back on the highway from somewhere like the Mendès France bus station in Belfort.