Scale Images in

edited October 2013 in Enyo 2
Hi,

I am working on a feed reader app. I show the html content of articles in:
{kind: "Scroller", name: "articlePreviewScroller", horizontal:"hidden", fit: true, touch: true, ondragfinish: "titleDragFinish", ondragstart: "titleDragStart", components: [
{name: "articlePreview", classes: "panels-sample-sliding-content", allowHtml: true, onclick: "catchtaponlink", content: ""}
]},
Now, I have the problem, that on phones the images often are to wide for the screen. Is there an easy way to automatically scale these to fit the screen?

Thanks for any help.

Comments

  • Borrow from CSS frameworks like Twitter Bootstrap... they define the class
    .img-responsive {
      display: block;
      height: auto;
      max-width: 100%;
    }
    so you could use similar rules for img tags inside your content area.
Sign In or Register to comment.