Advertisement
loloof64

Making chessboard with css v2

Jun 16th, 2015
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.91 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4.     <meta charset="utf-8">
  5.     <style type="text/css">
  6.     .chess_board {
  7.       display: block;
  8.     }
  9.  
  10.     .chess_cell {
  11.       display: block;
  12.       float: left;
  13.       font-family: serif;
  14.       font-size: 3em;
  15.       width: 1.2em;
  16.       padding-left: 0.3em;
  17.     }
  18.  
  19.     .white_cell {
  20.       background-color: rgb(217, 245, 2);
  21.     }
  22.  
  23.     .black_cell {
  24.       background-color: rgb(89, 34, 21);
  25.     }
  26.  
  27.     .white_piece {
  28.       color: rgb(179, 48, 63);
  29.     }
  30.  
  31.     </style>
  32.   </head>
  33.   <body>
  34.     My chess board
  35.     <div class="chess_board">
  36.       <div class="chess_cell black_cell">&#9818;</div>
  37.       <div class="chess_cell white_cell white_piece">&#9813;</div>
  38.       <div class="chess_cell black_cell white_piece">&#9813;</div>
  39.       <div class="chess_cell white_cell">&#9818;</div>
  40.     </div>
  41.     My another chess board ... to be drawn !
  42.   </body>
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement