On Thursday 2002-12-26 17:55 +0100, PHILIPPE DERBEZ wrote: > I did try the second solution but it doesn't work since the background color > returned is correctly set only if explicitly defined in the HTML Code via a > tag like "BGCOLOR=". > In the case of CSS defines, the bgcolor is stored in the hierachical tree of > styleContext and I assume that we must use the INHERIT bit but how ?
Backgrounds may seem like they inherit, but they don't -- many elements have transparent backgrounds and the background of the parent shines through. So if you want to figure out what background is behind something, you might need to walk up the content tree towards the root to find the nearest element that does have a background. -David -- L. David Baron <URL: http://www.people.fas.harvard.edu/~dbaron/ >
