Discussion Forums  >  Images, Documents, File Locations

Replies: 3    Views: 161

Adnan Basra
Aspiring developer
Profile
Posts: 189
Reg: Apr 26, 2013
Salmiyah
2,940
08/27/13 04:06 AM (10 years ago)

how to make images auto adjust height and width for Ios

Hello, I have some html pages in my app. i want them to automatically adjust to height and width of the device on which app is used. The problem is that the size of the images is 1360X1025. Is there a way that i can make them automatically adjust to iphone and ipad? Thanks in advance,
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
08/27/13 07:32 AM (10 years ago)
You could use CSS to resize them, depending on the detected resolution of the display screen. Cheers! -- Smug
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
08/27/13 08:59 AM (10 years ago)
In CSS, I set the width to a percentage for any images (e.g. 50%) for an image that takes up half the available width of the window and I leave the image height unset. That seems to give good results for me.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
08/28/13 04:27 AM (10 years ago)
Same as @AlanMac, for dynamic full screen: width:100%; height:auto; Works like a charm! If you make it less than 100% you might also want to center the image: http://www.w3.org/Style/Examples/007/center.en.html Farcat
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.