css - negative margin

HTML
[Edit]
+
0
-
0

CSS - negative margin

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<!doctype html> <html> <head> <style> body { display: flex; } .container { width: 100px; height: 100px; border: 1px solid black; margin: 30px; } .negative-margin { margin: -20px; } </style> </head> <body> <div class="container"> <div class="negative-margin">Example text...</div> </div> <div class="container"> <div >Example text...</div> </div> </body> </html>
Reset