Floating magically div

  1. <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”&gt;
  2.     <style type=”text/css”>
  3.         #container
  4.         {
  5.             display: table;
  6.             width:400px;
  7.             height:20px;
  8.         }
  9.         #leftBox
  10.         {
  11.             display: table-cell;
  12.             background-color:#006699;
  13.             width:20px;
  14.             height:20px;
  15.         }
  16.         #centerBox
  17.         {
  18.             display: table-cell;
  19.             background-color:#CC0000;
  20.             height:20px;
  21.         }
  22.         #rightBox
  23.         {
  24.             display: table-cell;
  25.             background-color:#006699;
  26.             width:20px;
  27.             height:20px;
  28.         }
  29.     </style>
  30. </head>
  31.     <div id=”container”>
  32.         <div id=”leftBox”></div>
  33.         <div id=”centerBox”>Content</div>
  34.         <div id=”rightBox”></div>
  35.     </div>
  36. </body>
  37. </html>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s