1
I need to use an external script that generates a form (so far so good, it is working) ... Once the script is inserted into the page, I need the form Abels (generated by the script) to be responsive (I believe with a window onresize.) ... But how do I do that, since I don’t have access to the script that generates the form?
I put window.onresize on the page but it has no effect on the form.
I put in an HTML script that generates a form... The form itself works, but I needed to make his Abels responsiveis
I created a script for window.onresize
and pointed out the getElementbyId
for the ID of the script div I want to change, but error it
<script type="text/javascript">
window.onload = function(){
document.getElementById('hot-spot-isc-0faaa9d5ee2e31146d01').innerHTML = document.body.offsetWidth;
}
window.onresize = function(){
document.getElementById('hot-spot-isc-0faaa9d5ee2e31146d01').innerHTML = document.body.offsetWidth;
var bodyWidth = document.body.offsetWidth;
if( bodyWidth>800 )
fs = ( bodyWidth-800 )/10;
else
fs = 0;
document.getElementsByTagName('h1')[0].style.fontSize = (fs+20)+'px';
document.body.style.fontSize = (fs+12)+'px';
}
</script>
Can you be more specific? without knowing which HTML is hard to help. Maybe you can only do this with CSS...
– Sergio
@Sergio answered from below
– Vinicius Felippe
What’s the mistake that comes
– Sergio
I didn’t understand exactly what the mistake is. But use the Media Rule CSS can be a viable solution.
– fernandoassiss
Wow, have you ever thought about using bootstrap to do all this work for you? If not, you get the tip: https://getbootstrap.com Strong hug.
– Rafael Souza