Advertisement
HTML

relative.html

Jan 30th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.44 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Relative Positioning</title>
  5. <meta charset="utf-8">
  6. <style>
  7. h1 {   background-color: #cccccc;
  8.        padding: 5px;   
  9.        color: #000000;
  10. }
  11. p {  position: relative;
  12.      left: 30px;
  13.      font-family: Arial,sans-serif;
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. <h1>Relative Positioning</h1>
  19. <p>This paragraph uses CSS relative positioning to be placed 30 pixels in from the left side.</p>
  20. </body>
  21. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement