html - Make a DIV responsive in a non-responsive site. -


i have div in non-responsive site contains ad 120x600 pixels. want make div float @ right of screen. desktop or large devices ok when in smaller device site non responsive when site loads div become small. if site responsive in device of width 400px cover portions of screen. need in non-responsive site. ads higher click through rate. example div -

<div id="float_rightad" style="position:fixed; top:15%; right:0;width: 160px; height:600px;  z-index:5000;">     <div style="position:absolute; left:-5px; margin-top:0px; z-index:15;">         <a href="javascript:void(0);" onclick="document.getelementbyid('float_rightad').style.display='none'"><img src="http://secretdiarybd.com/wp-content/uploads/2015/05/close.gif.png" alt="close" height="20"></img>         </a>     </div>     <div>         <script data-cfasync="false" type="text/javascript" src="//www.sparkadsmedia.com/adscript/120x600_english.js"></script>     </div> </div> 

how can in site?

you can achieve putting additional css3 statement in style block following , use relative width (%) ads (wherever possible):

<style type="text/css">     @media screen , (orientation: landscape ) , (max-width:400px ) {#float_rightad { style pertinent small screen}}     @media screen , (orientation: portrait ) , (max-width:400px )  {#float_rightad { style pertinent small screen}} </style> 

if add contains img element, can specify image width relative (in %) container div; otherwise, consider using iframe element. hope may help. best regards,


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -