Test Absolute DIV Centering


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



Copy this code and paste it in your HTML
  1. <div class="activity_group" style="">
  2.  
  3. <li>
  4. <div class="summary">
  5. <h4>Category One&nbsp;<span class="info_toggle">(<a href="#">?</a>)</span></h4>
  6. <p class="num_activities">3</p>
  7. </div>
  8. <div class="tooltip" style="display: block; ">
  9. <a href="#" class="close">close</a>
  10. <h4>Category Description</h4>
  11. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum urna turpis, gravida eu tincidunt a, consequat a mauris. Suspendisse dolor lacus,</p>
  12. </div>
  13. </li>
  14.  
  15. <li>
  16. <div class="summary" style="width: 200px; position:absolute; left:0px; right: 0px; margin:0px auto;padding:15px;border:1px;background-color:#ccc;">
  17. <h4>Category One&nbsp;<span class="info_toggle">(<a href="#">?</a>)</span></h4>
  18. <p class="num_activities">3</p>
  19. </div>
  20. <div class="tooltip" style="display: block; ">
  21. <a href="#" class="close">close</a>
  22. <h4>Category Description</h4>
  23. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum urna turpis, gravida eu tincidunt a, consequat a mauris. Suspendisse dolor lacus,</p>
  24. </div>
  25. </li>
  26. </div>
  27. </body>
  28. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.