while I am learning the American pronunciation, I find that the American pronounce the word "shorter" quite differently from the British. Specifically, the "t" sound in the word is pronounced like the "d" sound. Therefore, could somebody help me to explain this? Is there a rule behind this? Thank you in advance and have a nice day.
I believe the answer has to do with how the "r" that precedes the consonant "t" is being produced in American English (EDIT: when saying the word shorter as distinct from saying the word carton).
The American "r" can be produced with lips nearly pursed (imagine a goldfish), and that constricted mouth position causes the "t" to move from unvoiced dental [t] towards voiced dental [d].
The british "r" is produced with the cheeks tauter and drawn slightly back, and that mouth position is more amenable to an unvoiced dental [t].