How can I show different IMGs in my HTML in a UIWebView, based on the iPhone’s orientation? (Sorry if this is a trivial question…)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is pretty easy to do in CSS. There are media queries you can use to only have CSS applied to certain orientations. We do this in two ways, sometimes we will change the background image of a
<div>or else we will have two<img>tags and just set the one we don’t want shown withdisplay:noneHere is sample code to set the background of a div with id=’funky’