Return to Snippet

Revision: 4313
at November 25, 2007 17:14 by j_junyent


Initial Code
font,basefont {
    color:inherit; /* Standard browsers */
    color:expression(this.parentNode.currentStyle['color']); /* IE */
    font:inherit; /* Standard browsers. Font instead of font-size for Opera */
    font-family:expression(this.parentNode.currentStyle['fontFamily']); /* IE */
    font-size:100%; /* All browsers. Sizes are inherited */
  }
  center {
    text-align:inherit; /* Standard browsers */
    text-align:expression(this.parentNode.currentStyle['textAlign']); /* IE */
  }
  s,strike,u {
    text-decoration:inherit; /* Standard browsers */
    text-decoration:expression(this.parentNode.currentStyle['textDecoration']); /* IE */
  }
  *[align] { text-align:inherit; }  /* Standard browsers */
  * { text-align:expression(this.align ? this.parentNode.currentStyle['textAlign'] : ''); }  /* IE */
  img { margin:0; border:none; }  /* All browsers. Borders & margins are not inherited */
  ol { list-style-type:decimal; }  /* All browsers. Removes the type attribute */
  body { background-color:transparent; /* All browsers */ }
  table,tr,th,td {
    width:auto; /* All browsers */
    height:auto; /* All browsers */
    background-color:transparent; /* All browsers */
    vertical-align:inherit; /* All browsers (works in IE) */
    border:none; /* All browsers. Borders are not inherited */
  }

Initial URL
http://monc.se/kitchen/140/disabling-deprecated-html-using-css

Initial Description
When handing over a project to the client, you sometimes loose control over the content HTML source. Sometimes the client uses a CMS that allows them to have full control over certain parts of the HTML, and sometimes the client simply uses your templates to insert their own HTML content in the document.
The idea is to preserve the natural cascade and inheritance in all browsers, while gracefully disabling the HTML we don’t want the client to use. That way the client will stop using it, simply because it doesn’t “work” anymore. A graceful and gentle way of guiding the client in the right direction.

Initial Title
Disablig deprecated HTML code

Initial Tags
code

Initial Language
CSS