We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

valcartei on 07/20/07


Tagged

layout lists ie7


Versions (?)


definition list, dt and dd on same line IE7


Published in: PHP 


have dt and dd inline is done automatically in Firefox, but screws up in IE7. So we need additional css rules, which have to be applied only if IE is used.

  1. Create a news CSS document (iestyles.css):
  2. /*Style for IE7*/
  3. #adv-search dl{
  4. margin: 0;
  5. padding: 0;
  6. }
  7. #adv-search dt{
  8. margin: 0;
  9. padding: 0;
  10. display:inline;
  11. }
  12. #adv-search dd{
  13. margin: 0;
  14. padding: 0;
  15. display:inline;
  16. float: none;
  17. }
  18. #adv-search dt+dd{
  19. display:block;
  20. }
  21.  
  22. HTML head:
  23. <!--[if IE]>
  24. <link rel="stylesheet" type="text/css" href="../css/iestyles.css" />
  25. <![endif]-->
  26. HTML body apply adv-search id to the div containing the dl.

Report this snippet 

You need to login to post a comment.