Update layout for medium and small sizes.