On 16/01/2011 7:28 PM, Chetan Crasta wrote:
On Sat, Jan 15, 2011 at 10:17 PM, Tim Climis<[email protected]>  wrote:

So I put the following rule in the stylesheet:
[bgcolor] {background-color: transparent}

and it worked!  All the HTML elements with bgcolor were reset!

So, apparently, it's possible, using CSS, to override element styles not set
using CSS.  I can't really think of any common usages for this, but it might
be handy some time if you need to redo a site and don't have control over
the HTML source.

---Tim

For those who are curious, the selector that Tim used is the CSS
Attribute Selector, see:
http://www.w3schools.com/css/css_attribute_selectors.asp

~Chetan


I did a few test and found that you can use just simple type selectors also. This CSS,

body { background: lime; }

will override this.

<body bgcolor="#FFFFCC">



--
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to