Return to Snippet

Revision: 5290
at February 25, 2008 11:50 by neal_grosskopf


Initial Code
/* Depreciated Elements */
applet, basefont, center, dir, font, isindex, menu, s, strike, u { border: 5px dotted red !important; }

/* Depreciated Attributes */
*[background], *[bgcolor], *[clear], *[color], *[compact], *[noshade], *[nowrap], *[size], *[start], 
*[bottommargin], *[leftmargin], *[rightmargin], *[topmargin], *[marginheight], *[marginwidth], *[alink], *[link], *[text], *[vlink],
*[align], *[valign],
*[hspace], *[vspace],
*[height], *[width],
ul[type], ol[type], li[type]
{ border: 5px solid red !important; }


/* Empty Elements */
div:empty, span:empty, li:empty, p:empty, td:empty, th:empty { padding: 20px; border: 5px dotted orange !important; }

/* Empty Attributes */
*[alt=""], *[title=""], *[class=""], *[id=""], a[href=""], a[href="#"] { border: 5px solid orange !important; }


/* Proposed Depreciated Elements */
input[type="button"], big, tt { border: 5px dotted yellow !important; }

/* Proposed Depreciated Attributes */
*[border], a[target], table[cellpadding], table[cellspacing], a[name], form[name] { border: 5px solid yellow !important; }

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

Initial Description
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.

Initial Title
CSS Diagnostics - Find Depreciated Elements Using CSS

Initial Tags
css, html

Initial Language
CSS