Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> div { background-color: #666; height: 200px; position: relative; } p { margin: 0; color: #fff; } .top { position: absolute; top: -35px; color: #000000; } </style> </head> <body> <h2>Top property example</h2> <div> <p>Some text.</p> <p class="top">Text with the top property.</p> </div> </body> </html>