html - applying css to everything inside element -



html - applying css to everything inside element -

how apply css property within element.

like if have:

p { font:15px "lucida grande", arial, sans-serif; padding-right:150px; } <p> <span> <div> </div> </span> </p>

you posted invalid html. block-level elements such <div> not go within of <p> tags, , not within of inline elements such <span>.

anyway, css selector match *

p, p * { font: 15px 'lucida grande', arial, sans-serif; padding-right: 150px; }

be careful using * selector. "slow" when there lot of elements match.

html css

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -