Hybrid View

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    39
    Answers
    1
    Vote Rating
    5
    Zachary1748 is on a distinguished road

      0  

    Default 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...
    Code:
    @media all and (max-width: 320px) {
     .x-img {
        max-width  : 80%;
        height : auto;
     }
    }
    Your help is very much appreciated in advance if you wouldn't mind helping me out...

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Answers
    124
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    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.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    39
    Answers
    1
    Vote Rating
    5
    Zachary1748 is on a distinguished road

      0  

    Default


    No that didn't help all that shows is how to resize an image not resizing the image with the device

  4. #4
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    515
    Answers
    20
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    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.

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    39
    Answers
    1
    Vote Rating
    5
    Zachary1748 is on a distinguished road

      0  

    Default


    Okay, is there any way to do it with css?

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi