I'm trying to integrate this JavaScript section with the correct width on mobile, desktop and tablet, so I wrote this:
this appears on mobile (using @media (min-width:...)
in CSS)
<p align="center">News<script language="JavaScript" type="text/javascript" charset="iso-8859-1" src="//www.intopic.it/iframe.php?cat=fonti-rinnovabili&rootcat=tecnologia&type=2&bgcolor=FFFFFF&bdcolor=FFFFFF&lcolor=666666&font=1&fontsize=13&box=1050&window=1"></script></p>
this appears on tablet (using @media (min-width:...)
in CSS)
<p align="center">News<script language="JavaScript" type="text/javascript" charset="iso-8859-1" src="//www.intopic.it/iframe.php?cat=fonti-rinnovabili&rootcat=tecnologia&type=2&bgcolor=FFFFFF&bdcolor=FFFFFF&lcolor=666666&font=1&fontsize=13&box=1050&window=1"></script></p>
this appears on desktop (using @media (min-width:...)
in CSS)
<p align="center">News<script language="JavaScript" type="text/javascript" charset="iso-8859-1" src="//www.intopic.it/iframe.php?cat=fonti-rinnovabili&rootcat=tecnologia&type=2&bgcolor=FFFFFF&bdcolor=FFFFFF&lcolor=666666&font=1&fontsize=13&box=1050&window=1"></script></p>
The problem is due to the variable "box" that is actually read 3 times by the browser, as each portion of code for mobile, tablet and pc are present and readable by the browser, it gets the last box value which sets the width to 250 that is ok for mobile, but not for desktop and tablet, so I need something to show the only portion of code that fits the device every time dynamically, how can I do?