This is a migrated thread and some comments may be shown as answers.

Flexbox inside a listview li

1 Answer 113 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 01 May 2013, 02:45 PM
I am having some issues with styling an element inside an li.  I am trying to use a flexbox to render some content horizontally, and when I view it in the simulator in icenium it works great, however on the actual devices (both android and iOS) the rendering is different.  You can see the code in this jsfiddle.  I know that the devices are using the old flexbox syntax, I can make it look right when the content is outside of an li of a listview, but not inside.

On the actual device the flex elements are rendering vertically instead of horizontally, I have attached an image for illustration purposes on how it looks on a real device.

Is there something about the listview that I need to modify to get this to work correctly? Or am I just better off not using  flexbox? (in the example here I have a simple layout without many elements but I am  planning on making it more complex and a flexbox would really be nice for implementing it).


1 Answer, 1 is accepted

Sort by
0
Accepted
David
Top achievements
Rank 1
answered on 01 May 2013, 03:16 PM
So I found a fix, the issue was making the <a> element the flex container, I inserted a flex container 'div' inside the 'a' and all is well.  Updated jsfiddle here in case this helps someone else ...
Tags
ListView (Mobile)
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or