Ignoring All Styles

Album Cover: Life After Death

"While your gun's raisin', mine is blazin'."
The Notorious B.I.G. / I Love the Dough

Posted on February 18, 2004 12:34 AM in Web Development
Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

While working on a web application project tonight, I stumbled upon what I think is a weakness of CSS – the inability to force an HTML element to ignore all style rules that would normally be applied to it.

Part of the web application requires that some user defined HTML be stored in a database and, at times, be output as actual HTML in a page. In some cases, this HTML is output as a subset of a parent HTML document, simply for viewing purposes. When this is the case, the style rules for the parent document get applied to the HTML subset. In my eyes, this is undesirable, as I would like the subset to sit in it's own special <div> and have no styles associated with it (so that it appears as it might when existing as an entity on its own).

After Googling on the subject of ignoring CSS rules, I came to the conclusion that telling a child element of a web page to ignore all style rules in the document is not currently possible. It's possible that I'm wrong (and I hope I am), but based on the lack of any information it's the only conclusion I can come to.

It seems like under certain circumstances (like the one I've mentioned here in this post), a user should be able to create a <div> in which none of the parent document's style rules are applied, using something like the following:

<div style="inherit: none;">

Now I realize that looks a little backward to anyone who knows their CSS, but it's just an example to convey my idea. In my opinion, whenever a UA rendered this type of element, it would use its default style rules (ignoring any that had been established via any external stylesheets, inline style rules, etc.).

If anyone knows of a way of accomplishing this feat using current CSS techniques, please leave a comment. I'd love to know how it's done.


Niche Relevant backlinks services on September 08, 2016 at 4:13 AM:

Keep doing awesome read few posts on this site and I consider that your web journal is exceptionally fascinating and has sets of fabulous data.


Piano For All Download on October 09, 2016 at 10:33 PM:

An interesting dialogue is price comment. I feel that it is best to write more on this matter, it may not be a taboo topic however usually individuals are not enough to talk on such topics. To the next. Cheers.


xbox on October 22, 2016 at 2:55 AM:

On the off chance that more individuals that compose articles truly fretted about composing incredible substance like you, more perusers would be occupied with their works. Much thanks to you for thinking about your substance. chaturbate token hack xbox live account


netflix on November 07, 2016 at 2:21 AM:

This one is great. keep doing awesome!.. minecraft world download netflix activation code


netflix on November 07, 2016 at 2:21 AM:

A debt of gratitude is in order for sharing this helpful information.. minecraft world download netflix activation code


guia adeus estrias on January 24, 2017 at 12:00 AM:

Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet!


voyance-amour-eternel.com on January 31, 2017 at 11:46 PM:

I have bookmarked your blog, the articles are way better than other similar blogs.. thanks for a great blog!


v neck undershirts on February 01, 2017 at 11:38 PM:

This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things.


Page authority on February 05, 2017 at 9:54 PM:

Precisely, you're exceptionally sort of us about remark!.


James Cangelosie on February 19, 2017 at 10:16 PM:

You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! High Trust Flow Backlinks


website games banat on March 14, 2018 at 8:04 AM:

This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things......


Post Comments

If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.


Email Address:



Check this box if you hate spam.