-
12 Sep 2012 4:37 PM #1
Unanswered: How to scale images or containers to different device size (width and hieght)
Unanswered: How to scale images or containers to different device size (width and hieght)
Hello,
I am wanting to scale my Images or my containers, so when the device get bigger the images or containers get bigger, without having to change it manually. Pretty much doing what a device profile does to exact, just in a different way. I was thinking of using CSS something like this below but it doesn't work...
Your help is very much appreciated in advance if you wouldn't mind helping me out...Code:@media all and (max-width: 320px) { .x-img { max-width : 80%; height : auto; } }
-
12 Sep 2012 10:25 PM #2Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 76
- Answers
- 124
HI!
check out the following tutorial, it will helps you in your scenario,
http://www.sencha.com/learn/how-to-use-src-sencha-io/sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
13 Sep 2012 5:32 AM #3
No that didn't help all that shows is how to resize an image not resizing the image with the device
-
13 Sep 2012 5:42 AM #4
add mode: 'element' to your images config.
as long as your container is resizing along with your device size, the image inside that container (if also bound to the size of it's parent) will resize as well.
-
17 Sep 2012 3:09 PM #5
Okay, is there any way to do it with css?


Reply With Quote