display inline-block crossbrowser (including ie6)


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. .holder{
  2. letter-spacing:-1ex; /*fix to remove the "space" (generated by indentation) beetween elements*/
  3. }
  4. .holder *{
  5. letter-spacing:0ex; /*fix to return the default value of the letter-spacing*/
  6. }
  7. .holder .inlined-block{
  8. display:inline-block;
  9. /*ie6, 7 & 8 hack*/
  10. *display:inline;
  11. zoom:1;
  12. width:49.9%; /*just for example*/
  13. }
  14.  
  15. /*
  16. Example
  17. <div class="holder">
  18. <div class="inline-block">content</div>
  19. <div class="inline-block">content</div>
  20. <div class="inline-block">content</div>
  21. <div class="inline-block">content</div>
  22. <div class="inline-block">content</div>
  23. </div>
  24. */

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.