Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Title</title>
- <meta charset="UTF-8">
- <style>
- * {
- box-sizing: border-box;
- }
- body {
- margin: 20px;
- font-size: 0px;
- }
- .box {
- width: 150px;
- border: 2px solid black;
- display: inline-block;
- font-size: 72px;
- text-align: center;
- padding-top: 30px;
- padding-bottom: 30px;
- margin: 10px;
- }
- #b1 {
- background-color: yellow;
- position: relative;
- top: 0px;
- left: 340px;
- }
- #b2 {
- background-color: blue;
- position: relative;
- top: 0px;
- left: -170px;
- }
- #b3 {
- background-color: green;
- position: relative;
- top: 0px;
- left: 170px;
- }
- #b4 {
- background-color: red;
- position: relative;
- top: 0px;
- left: -340px;
- }
- </style>
- </head>
- <body>
- <div class="box" id="b1">1</div>
- <div class="box" id="b2">2</div>
- <div class="box" id="b3">3</div>
- <div class="box" id="b4">4</div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement