Posted By

codingforever99 on 10/19/13


Tagged

div css html


Versions (?)

how to put multiple divs on the same line.


 / Published in: CSS
 

URL: http://function-code.blogspot.com/2012/12/how-to-put-multiple-divs-on-same-line.html

how to put multiple divs on the same line.

  1. <style>
  2. .box1{
  3. width:20px;
  4. height:20px;
  5. font-size: 12px;
  6. color:black;
  7. background:#D7E5F0;
  8. border:.1em solid red;
  9. padding:30px;
  10. font-weight: bold;
  11.  
  12. float: left;
  13. }
  14. </style>
  15.  
  16. <body>
  17. <div id="div1" class="box1">Div 1.</div>
  18. <div id="div2" class="box1">Div 2.</div>
  19. <div id="div3" class="box1">Div 3.</div>
  20. <div id="div4" class="box1">Div 4.</div>
  21. </body>

Report this snippet  

You need to login to post a comment.