As others have said antibiotics don't help the virus itself only the secondary infections. If you have a fever it may not be a cold. If it is a cold you can transmit it usually the first 3 days after that you become less contagious. I would take an extra day or two with a baby. You can wear a mask and gloves. If you have the flu you are contagious the day before you have symptoms and up to 5-7 days after you have symptoms. Children are contagious longer than 7 days. As was said for both the cold and the flu you can transmit it by airborne methods such as sneezing, coughing and talking or by coughing or sneezing on a surface and then the baby touches the surface and touches his/her face especially the nose or eyes and gets it. Also, with the flu (not a cold) you can spread it by sharing eating utensils. If someone sneezes you can spread it up to 6 feet away. So wash your hands frequently and/or use alcohol based hand sanitizers etc.
The z pak is Azithromycin that is a macrolide-type antibiotic and is used to treat a wide variety of bacterial infections by stopping the growth of bacteria.
Azithromycin will not work for viral infections such as the common cold or flu.
If you have been prescribed with this antibiotic by your doctor, it is likely that you were prescribed this medication because the doctor was of the opinion that you have a chest infection or a upper respiratory tract infection, or both.
Unnecessary use or misuse of any antibiotic can lead to its decreased effectiveness.
If your cough is because of the bacterial infection, then the antibiotic will kill the bacteria, even though you may still be left with a residual cough.
If you have a viral infection then you will be contagious every time you speak, sneeze or cough.
An antibiotic does nothing for a virus, and a cold is a virus. The only reason to prescribe an antibiotic would be if you got a secondary infection, such as a sinus infection, which may follow a cold. No good doctor would prescribe an antibiotic for a cold or flu. Since it does not treat a virus, it does not change whether you are contagious or not.