views:

32

answers:

1

I have an overlaying div (much like addthis.com) that I want to protect from inheriting styles. I have looked at reset-css files such as Blueprint but this tends to screw up the parent styles as well.

For instance:

User has div { border-right:1px solid red; } This is appended to all divs on the page, including my overlay. Of course I can write #mydiv { border-right:0; } but doing this for all css-properties is massive. There could be an easier way?

PS. I am not in an iframe, and the parent page is dynamic, could be any URL really DS.

+1  A: 

Maybe something like this might fix your overlay div.

div#myoverlay {border-right:0;}
Kyle Sevenoaks
´div#myoverlay´ would protect me from border-right properties, but what about all hundreds of properties that are possible? is there not a better way to reset css for 1 element (being my overlay)
Unfortunately, if you want to reset all the properties for this one element, you'll have to put all the attributes into the CSS for Myoverlay.
Kyle Sevenoaks