got desired effect by adding span but don't understand why can't replace span with before