HTML

absolute.html

Mar 13th, 2017
131
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.56 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Absolute Positioning</title>
  5. <meta charset="utf-8">
  6. <style>
  7. h1 {   background-color: #cccccc;
  8.        padding: 5px;   
  9.        color: #000000;
  10. }
  11. p { position: absolute;
  12.        left: 200px;
  13.        top: 100px;
  14.        font-family: Arial,sans-serif;
  15.        width: 300px;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <h1>Absolute Positioning</h1>
  21. <p>This paragraph is 300 pixels wide and uses CSS absolute positioning to be placed 200 pixels in from the left and 100 pixels down from the top of the browser window.</p>
  22. </body>
  23. </html>
Comments
  • User was banned
Add Comment
Please, Sign In to add comment