Guest User

Untitled

a guest
Mar 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>JS Bin</title>
  7. <style id="jsbin-css">
  8. body{
  9. margin:0;
  10. }
  11. #wrapper{
  12. width:100%;
  13. height:100vh;
  14. border:3px solid red;
  15. box-sizing:border-box;
  16. background-color:cyan;
  17. }
  18. p{
  19.  
  20. position: relative;
  21. float: left;
  22. top: 50%;
  23. left: 50%;
  24. transform: translate(-50%, -50%);
  25.  
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <div id="wrapper">
  31. <p>hello world ! this should be in center...</p>
  32. </div>
  33.  
  34.  
  35. <script id="jsbin-source-css" type="text/css">body{
  36. margin:0;
  37. }
  38. #wrapper{
  39. width:100%;
  40. height:100vh;
  41. border:3px solid red;
  42. box-sizing:border-box;
  43. background-color:cyan;
  44. }
  45. p{
  46.  
  47. position: relative;
  48. float: left;
  49. top: 50%;
  50. left: 50%;
  51. transform: translate(-50%, -50%);
  52.  
  53. }
  54.  
  55. </script>
  56. </body>
  57. </html>
Add Comment
Please, Sign In to add comment