Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> h2.pos_left { position: relative; left: -20px; } h2.pos_right { position: relative; left: 20px; } </style> </head> <body> <h2>This is a heading with no position</h2> <h2 class="pos_left">This heading is moved left according to its normal position</h2> <h2 class="pos_right">This heading is moved right according to its normal position</h2> <p>Relative positioning moves an element RELATIVE to its original position.</p> <p>The style "left:-20px" subtracts 20 pixels from the element's original left position.</p> <p>The style "left:20px" adds 20 pixels to the element's original left position.</p> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss_position_relative by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:53:13 GMT --> </html>
Result:
Try it Yourself - © w3schools.com