Posted By

visuallyspun on 05/27/08


Tagged

css Diagnostics troubleshoot


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

basicmagic
Wiederkehr
wizard04
hannizkaos
eriksagen
charmcitycoder


CSS diagnostics Script


 / Published in: CSS
 

URL: http://reinholdweber.com/?p=23

Find deprecated elements and attributes using CSS. Simply add the CSS below to the end of your style sheet and it will highlight bad code.

  1. /* Empty Attributes */
  2.  
  3. *[alt=""], *[title=""], *[class=""], *[id=""], a[href=""], a[href="#"]
  4.  
  5. { border: 5px solid yellow !important; }
  6.  
  7.  
  8.  
  9. /* Deprecated Elements */
  10.  
  11. applet, basefont, center, dir, font, isindex, menu, s, strike, u
  12.  
  13. { border: 5px dotted red !important; }
  14.  
  15.  
  16.  
  17. /* Deprecated Attributes */
  18.  
  19. *[background], *[bgcolor], *[clear], *[color], *[compact], *[noshade], *[nowrap], *[size], *[start],
  20.  
  21. *[bottommargin], *[leftmargin], *[rightmargin], *[topmargin], *[marginheight], *[marginwidth], *[alink], *[link], *[text], *[vlink],
  22.  
  23. *[align], *[valign],
  24.  
  25. *[hspace], *[vspace],
  26.  
  27. *[height], *[width],
  28.  
  29. ul[type], ol[type], li[type]
  30.  
  31. { border: 5px solid red !important; }
  32.  
  33.  
  34.  
  35. /* Proposed Deprecated Elements */
  36.  
  37. input[type="button"], big, tt
  38.  
  39. { border: 5px dotted #33FF00 !important; }
  40.  
  41.  
  42.  
  43. /* Proposed Deprecated Attributes */
  44.  
  45. *[border], a[target], table[cellpadding], table[cellspacing], *[name]
  46.  
  47. { border: 5px solid #33FF00 !important; }

Report this snippet  

You need to login to post a comment.