We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

neal_grosskopf on 02/25/08


Tagged

css html elements depreciated


Versions (?)


Who likes this?

5 people have marked this snippet as a favorite

neal_grosskopf
SmpleJohn
SpinZ
basicmagic
wizard04


CSS Diagnostics - Find Depreciated Elements Using CSS


Published in: CSS 


URL: http://www.nealgrosskopf.com/tech/thread.asp?PID=3

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


  1. /* Depreciated Elements */
  2. applet, basefont, center, dir, font, isindex, menu, s, strike, u { border: 5px dotted red !important; }
  3.  
  4. /* Depreciated Attributes */
  5. *[background], *[bgcolor], *[clear], *[color], *[compact], *[noshade], *[nowrap], *[size], *[start],
  6. *[bottommargin], *[leftmargin], *[rightmargin], *[topmargin], *[marginheight], *[marginwidth], *[alink], *[link], *[text], *[vlink],
  7. *[align], *[valign],
  8. *[hspace], *[vspace],
  9. *[height], *[width],
  10. ul[type], ol[type], li[type]
  11. { border: 5px solid red !important; }
  12.  
  13.  
  14. /* Empty Elements */
  15. div:empty, span:empty, li:empty, p:empty, td:empty, th:empty { padding: 20px; border: 5px dotted orange !important; }
  16.  
  17. /* Empty Attributes */
  18. *[alt=""], *[title=""], *[class=""], *[id=""], a[href=""], a[href="#"] { border: 5px solid orange !important; }
  19.  
  20.  
  21. /* Proposed Depreciated Elements */
  22. input[type="button"], big, tt { border: 5px dotted yellow !important; }
  23.  
  24. /* Proposed Depreciated Attributes */
  25. *[border], a[target], table[cellpadding], table[cellspacing], a[name], form[name] { border: 5px solid yellow !important; }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: SmpleJohn on February 25, 2008

Me like. Thank you for pointing this out.

You need to login to post a comment.