Margin Inherit CSS - Tryit Editor for Web Developers
Edit This Code:
See Result »
<html> <head> <style> div { border: 10px double brown; margin-left: 120px; } p.value { margin-left: inherit; } h1, p { text-align: center; color: purple; } </style> </head> <body> <h1>Use of the Inherit Value</h1> <p>Let the Left Margin be Inherited from the parent element....</p> <div> <p class="value">This paragraph has an Inherited Left Margin from the div element....</p> </div> <img src="logo.jpg"/> </body> </html>
Result: