Guest User

Untitled

a guest
Oct 18th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title>Experiment with CSS positioning for Shoes</title>
  6. <!--
  7. Basic styles to identify elements and allow positioning
  8. -->
  9. <style>
  10. body {
  11. margin: 0;
  12. padding: 0;
  13. background-color: #77f;
  14. font-family: sans-serif;
  15. }
  16.  
  17. #background {
  18. background-color: #7f7;
  19. position: absolute;
  20. width: 100%;
  21. height: 100%;
  22. }
  23.  
  24. p {
  25. margin: 0;
  26. padding: 0;
  27. }
  28. </style>
  29.  
  30. <!--
  31. Vary these to experiment with positioning
  32.  
  33. Make measurements in px, or in %.
  34.  
  35. example:
  36. top: 100px;
  37. width: 400px;
  38. height: 50%;
  39.  
  40. defaults:
  41. width: 100%;
  42. height: 100%;
  43. left: auto;
  44. top: auto;
  45. right: auto;
  46. bottom: auto;
  47. -->
  48. <style>
  49. #background {
  50. width: 400px;
  51. height: 50%;
  52. top: 100px;
  53. }
  54.  
  55. </style>
  56. </head>
  57. <body>
  58.  
  59. <div id="background">
  60. <p>This is a test</p>
  61. </div>
  62.  
  63. </body>
  64. </html>
Add Comment
Please, Sign In to add comment