Return to Snippet

Revision: 6514
at May 27, 2008 02:34 by visuallyspun


Initial Code
/* Empty Attributes */

*[alt=""], *[title=""], *[class=""], *[id=""], a[href=""], a[href="#"] 

{ border: 5px solid yellow !important; }



/* Deprecated Elements */

applet, basefont, center, dir, font, isindex, menu, s, strike, u 

{ border: 5px dotted red !important; }



/* Deprecated 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; }



/* Proposed Deprecated Elements */

input[type="button"], big, tt 

{ border: 5px dotted #33FF00 !important; }



/* Proposed Deprecated Attributes */

*[border], a[target], table[cellpadding], table[cellspacing], *[name] 

{ border: 5px solid #33FF00 !important; }

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

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

Initial Title
CSS diagnostics Script

Initial Tags
css

Initial Language
CSS