Optify css.
Handle placement when there's not enough horizontal space.