Posted By

rduv on 10/20/06


Tagged


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

postNuKe
visualAesthetic
aziz
monapdx


feildset like div


 / Published in: CSS
 

  1. div class="container">
  2. <p class="legend_lookalike">some text</p>
  3. <p>Some more text inside the div - as much as you want...</p>
  4. <p>Maybe some more text...</p>
  5. </div>
  6.  
  7. CSS:
  8. div.container {
  9. margin: 20px 0 0 0;
  10. border: solid 1px #555;
  11. background-color: #eee;
  12. width: auto;
  13. }
  14. div.container p {
  15. clear: left;
  16. margin: 6px 3px 6px 10px;
  17. }
  18.  
  19. div.container p.legend_lookalike {
  20. float: left;
  21. border: solid 1px #555;
  22. background-color: #fff;
  23. margin: -0.7em 0 0 10px;
  24. padding: 0 4px;
  25. position: relative;
  26. }
  27.  
  28. @media all {
  29. *html div.container,*html div.container p.legend_lookalike {
  30. height: 0;
  31. }

Report this snippet  

You need to login to post a comment.