What is gram staining?
Gram staining is a technique used to differentiate bacteria based on the way their cell walls stain.
What is the basis of gram staining?
The basis of gram staining is that gram-positive cells will retain more crystal violet when dehydrated due to the cell wall containing a thick layer of peptidoglycan whereas gram-negative cells will have more crystal violet leave when dehydrated due to the cell wall containing a thin layer of peptidoglycan. That is why a fuchsin counter stain is used to stain gram-negative cell walls sufficiently.