-1

I have a javascript code that generates an html content on the user's page. The problem is that the styles used by the user affect my html code. I want to completely reset all css under my container class/id, how can i do that ?

For example the normal css reset styles don't reset table borders, background colors etc.

amitdar
  • 917
  • 3
  • 13
  • 35
  • I don't get your question – Mr. Alien May 22 '14 at 14:03
  • 1
    ...you write CSS overrides for everything. – Ennui May 22 '14 at 14:04
  • If your script requires a complete reset of styles, you're doing something wrong. Add the styles needed to your elements, don't reset the users styles. – adeneo May 22 '14 at 14:04
  • Just make sure every element in your generated html code has a style defined by you. It will automatically override any style already defined on page (outside your code block). – Nawed Khan May 22 '14 at 14:06
  • I want to override / reset all css elements only under my html code (e.g. start with specific id). – amitdar May 22 '14 at 14:14

1 Answers1

0

You can use an iframe for your code to not be affected by css on the current user page .

<iframe src="YourURL" ></iframe> 
Luchian Chivoiu
  • 300
  • 4
  • 14