Try this: Create a plain div
without any style or content outside of the red div
. Now you can use a loop over all styles of the plain div
and assign then to your inner div
to reset all styles.
Of course this doesn't work if someone assigns styles to all div
s (i.e. without using a class. CSS would be div { ... }
).
The usual solution for problems like this is to give your div
a distinct class. That way, web designers of the sites can adjust the styling of your div
to fit into the rest of the design.