Reputation: 8683
I want to create Overlapping Elements using React Native.
An example can be Trixie App as follows -
I want to create a box like that in-between blue & white color.
Can it be done using Flexbox or do we need Absolute Positioning ? Bcz if I create using Absolute positioning, lets assume I give it height:100
(the blue color) then the white
chat box might not be halfway up & down on various devices depending on their screen dimensions.
Also how to make it so that its responsive on various devices like Tablets, etc ?
Upvotes: 0
Views: 3099
Reputation: 8683
Answering my own question.
It can be done using position: absolute; top: -25;
& it has to use position: relative
in the inside.
I'll post a link to complete repo soon enough. Answering only this much for now. Repo will be provied in 2 days.
Also, a repo has been made to do it much simpler - https://github.com/entria/react-native-view-overflow
Upvotes: 2