Let a body of volume v and density d be placed in a liquid of density rho.The body is insoluble in the liquid.
If v_i volume be immersed,then the weight of the displaced liquid or the buoyant force F_buarr experienced by the body will be
F_buarr=v_irhog.......[1]
By the principle of floatation this upward buoyant force experinced by the body should balance the weight of the body Wdarr=vdg to make the body float.
As per equation [1] the magnitude of buoyant force F_b depends on v_i and rho. With increase of the immersed volume v_i (subject to the maximum v,the volume of the body) and also with increase in the value of rho the buoyant force F_buarr increases.
So overall state of floatation is determined by the value of F_buarr
When wdarr>(F_buarr)_max=vrhog->"the body sinks"
When wdarr<=(F_buarr)_max=vrhog->"the body floats"
During floatation
wdarr=F_buarr=v_irhog

In the above figure it has been shown how state of floatation of an egg in water can be controlled by changing the density of water with dissolution of common salt in it in requisite amount.