Bactrim for Pediatric Use. Bactrim can be used in children for the treatment of certain bacterial infections, but the dosage may differ based on the child's age, weight, and the specific infection being treated. Your child's healthcare provider will determine the appropriate dosage of Bactrim based on these factors.