Is it possible to put CSS3 @media rules inline?

pzx5073

New Member
I need to dynamically load banner images into a HTML5 app and would like a couple of different versions to suit the screen widths - I cant correctly dtermine the phones screen width - so the only way I can think of doing this is to add background images of a div and use @media to determine the screen width and display the correct image...For example \[code\] <span style="background-image:particular_ad.png; @media (max-width:300px){background-image:particular_ad_small.png;}"></span>\[/code\]Is this possible - Or does anyone have any other suggestions?
 
Top