question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Header] elevation or zIndex don't work

See original GitHub issue

In Footer component this works.

Expected behaviour

image

Actual behaviour

image

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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
FrK492commented, Feb 1, 2019

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

0reactions
the-habucommented, Apr 17, 2019

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:

<Container>
    <Header/>
    <Content refreshControl={} />
    <Footer />
</Container>

Using RN 0.58.4 and native-base 2.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)?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found