Fix layout issue by side effect in CSS