2
I was wondering if I can lock the CSS for a specific location.
Look at the following:
I created a system where each user will define their own Header
and Footer
(consequently your own css). However, I would like my client’s file to have no effect on mine when reading the Csss. Example, if it copies some HTML element and wants to change, it could not.
I know this is possible, because in Wordpress can do. But I do not know how to do this.
Obs.: I tried to use the iframe
, but it’s unfeasible, because our system is responsive, I can’t do the iframe
track the size of header
or footer
that keeps decreasing every time you give a resize
onscreen.
Thank you
Load the user’s before yours, define classes and ids with very characteristic prefixes, and use ! Important in your things (it’s still a scam). If your CSS comes after your CSS, and your directives have specificity bigger, their will be worth.
– Bacco
Doesn’t it pay to create a cookie to store customer’s css settings? avoids this kind of problem and makes the system more customizable.
– Gabriel Rodrigues
Thanks Bacco, but even so, if he uses an attribute that in mine has not defined his will be worth. Then the gambiarra does not avenge...
– Ivan Quevedo Oliveira
I don’t know about Cookie Gabriel, I’ll look it up. Thank you
– Ivan Quevedo Oliveira