Forum Moderators: not2easy
That's a problem, because I'm actually going to be providing the form to a fair number of other websites, all run by non-techies. I need cut and paste code that looks the same no matter what container it's placed in.
I know this is a general question - but what properties should I be fixing in my css to ensure that the entire form (text/borders/background/buttons, etc) looks the same on the stand-alone as it does when inserted inside someone else's html with other css?
(I googled stuff about preventing inheritence and it seems even the suggestion of doing so brands me as a heretic :) So I'm trying to do it right. ).
#form-wrapper {
}
#form-wrapper form {
}
#form-wrapper input {
}
et cetera
<div id="form-wrapper">
...................
Or put classes on each specific element?
input.my-css[type=textarea] {
}
or
textarea.new-css {
}
<form class="my-css">
Either approach should over-ride the CSS that is getting in the way of the results you want.
An iframe might be your best solution: it's another web page and gives you control.