In what way you can prevent the styles of an element created with javascript from being confused with the styles of the page

0

It's just that I'm creating a kind of plugin for any type of web page that consists of a chatbot, an assistant for collecting user data, asking name, surname and email, and phone, and I import it nothing more by putting a script on the page since I create all the chat with the function createElement() of Javascript, and create a style sheet which also inserted by this function, basically, is an injection of HTML on the page, a injection of styles so that it can work, but it happens that the styles of the plugin are often confused with the styles of the page, and I do not want this, I want the page styles to stay with their styles, and the chat styles, keep the ones I have set for you. I already tried placing the !important to all the properties of the style sheet of the plugin but nothing, nothing happens, remains the same.

    
asked by Anthony Medina 14.01.2018 в 20:37
source

0 answers