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

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -