ahmed0saber

Multicoloured div in HTML CSS

Jun 3rd, 2021
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.45 KB | None | 0 0
  1. <html>
  2. <head>
  3.   <style>
  4.   body{
  5.     margin: 0;
  6.     background-color: #111;
  7.   }
  8.   div {
  9.     margin: auto;
  10.     margin-top: 40px;
  11.     margin-bottom: 40px;
  12.     width: 150px;
  13.     height: 150px;
  14.     background: -webkit-linear-gradient(top, teal, teal 25%, #333 25%, #333);
  15.   }
  16.   p{
  17.     padding: 10px;
  18.     margin: 0;
  19.     color: #EEE;
  20.   }
  21.   </style>
  22. </head>
  23. <body>
  24. <div>
  25.   <p>Hello</p>
  26.   <p>My name is Ahmed Saber</p>
  27. </div>
  28. </body>
  29. </html>
Advertisement
Add Comment
Please, Sign In to add comment