keyword
inherit — CSS reference
Forces the property to take its parent’s computed value, even if the property is not normally inherited. This copies a value, not all the parent’s rules or the parent’s layout. On the root, inheritance falls back to the initial value.
Formal Syntax & Structure
css syntaxcss
property: inherit;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#parent {padding:12px;font-size:20px} #a {padding:inherit;font-size:inherit}</style><body><section id="parent"><p id="a">Copy</p><p id="b">Default</p></section></body></html>