[Header] elevation or zIndex don't work
See original GitHub issueIn Footer component this works.
Expected behaviour
Actual behaviour
Steps to reproduce
Try with this code:
render() {
return (
<Container>
<Container>
<Header style={{ elevation: 1, zIndex: 0 }}>
<Title>
{'Header'}
</Title>
</Header>
<Content
style={{ elevation: 0, zIndex: 0 }}
refreshControl={<RefreshControl refreshing={false} />}
/>
</Container>
<Container>
<Footer style={{ elevation: 1, zIndex: 0 }}>
<Title>
{'Footer'}
</Title>
</Footer>
<Content
style={{ elevation: 0, zIndex: 0 }}
refreshControl={<RefreshControl refreshing={false} />}
/>
</Container>
</Container>
);
}
Environment
native-base 2.8.0 react-native 0.57.0 react 16.5.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
4 reasons your z-index isn't working (and how to fix it)
Alternative Solution: Remove positioning from the content, so it won't limit the modal's z-index. ... Since the content element is now ...
Read more >Why does z-index not work on my header to show my shadow?
The z-index property works only on positioned elements. Those include position: relative , position: absolute , position: fixed ...
Read more >z-index - CSS: Cascading Style Sheets - MDN Web Docs
The z-index CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger ...
Read more >Why does my header overlap other elements when i mark its ...
I want my header to stay fixed on top. Without the position:fixed my code works as expected (where the header stays on top...
Read more >z-index - CSS-Tricks
This code is not working because your all element position is relative. you should try parents position is relative and child position is ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having the same issue with RN 0.58.3 and Native-Base 2.11.0
Does anyone know how to solve the issue?
@SupriyaKalghatgi
Same issue here, any news on how to fix this?
We are using a simple layout (caution, pseudo code) and still the refreshControl renders on top of the header:
Using RN
0.58.4
and native-base2.12.1
. It’s no showstopper, but I want to get this right. Is there a working example in the kitchensink maybe (couldn’t find one)?