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 absolute/fixed value with transparent background

See original GitHub issue

I’m trying to make the header to be transparent. I’ve tried styling it to absolute but its not in the screen (hidden) if I do that. also if I do backgroundColor: 'transparent' it doesn’t work as well.

image

I want the Header component to be on top of the view that has the gradient. I want to achieve something like this.

image

Is it possible with Native Base header component or I have to create my own?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
iamadityaazcommented, Apr 11, 2019

I done this using style={{ backgroundColor: null }}

4reactions
qin-guancommented, Jun 9, 2018

To make header transparent you should do

class App extends Component {
  static navigationOptions = {
    headerStyle: {
      backgroundColor: 'transparent'
    }
  }
  render() {
    return (
      <YourViewHere/>
    )
  }
}

You did backgroundColor: { 'transparent' } instead with {} Also keep note that the white may be your actual background color, so you may mistake your View background color for that

Hope this helps! Please let me know if it does! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transparent header with background image - HTML & CSS
How it is possible to make header transparent so slider would be visible behind menu. However I would like header background to be...
Read more >
Transparent Background Images - CSS-Tricks
i want to transparent my background image without take position relative, absolute, fixed etc. if i containg opacity 0 to 1 then my ......
Read more >
How to make the header transparent? - Stack Overflow
box element, so setting it partially transparent just shows the color of the body element, which by default is white. Set the background...
Read more >
position - CSS: Cascading Style Sheets - MDN Web Docs
A positioned element is an element whose computed position value is either relative , absolute , fixed , or sticky . (In other...
Read more >
CSS position properties (relative, absolute, fixed ... - YouTube
Using the position property is one of many ways you can change the layout and positioning of an element to create unique web...
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