Like other β-lactam antibiotics, dicloxacillin acts by inhibiting the synthesis of bacterial cell walls. It inhibits cross-linkage between the linear peptidoglycan polymer chains that make up a major component of the cell wall of Gram-positive bacteria.