Layout fixes for rich text content