css_vertical_align.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
  5. <style type="text/css">
  6. p {
  7. line-height: 1;
  8. outline: 1px solid grey;
  9. padding: 0;
  10. }
  11. p span {
  12. border: 1px dotted red;
  13. margin: -1px;
  14. }
  15. p span:after {
  16. color: red;
  17. content: " - " attr(style);
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <p><IMG SRC="images/vblank.gif" alt="[Image]" height="20"><span style="vertical-align: sub;">test</span></p>
  23. <p><IMG SRC="images/vblank.gif" alt="[Image]" height="20"><span style="vertical-align: super;">test</span></p>
  24. <p><IMG SRC="images/vblank.gif" alt="[Image]" height="20"><span style="vertical-align: top;">test</span></p>
  25. <p><IMG SRC="images/vblank.gif" alt="[Image]" height="20"><span style="vertical-align: text-top;">test</span></p>
  26. <p><IMG SRC="images/vblank.gif" alt="[Image]" height="20"><span style="vertical-align: middle;">test</span></p>
  27. <p><IMG SRC="images/vblank.gif" alt="[Image]" height="20"><span style="vertical-align: bottom;">test</span></p>
  28. <p><IMG SRC="images/vblank.gif" alt="[Image]" height="20"><span style="vertical-align: text-bottom;">test</span></p>
  29. <p><IMG SRC="images/vblank.gif" alt="[Image]" height="20"><span style="vertical-align: baseline;">test</span></p>
  30. </body>
  31. </html>