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 icons are not aligned in the middle and different background?

See original GitHub issue

Got the latest release from npm 0.4.9. But as soon as I try it out. The header icons are not center aligned. The background of the header is blue green and the foreground is black., I was expecting a dark gray background and a white foreground just like what’s on the docs. Look the image below. Maybe it’s not compatible with the latest react-native or am I doing something wrong?

dependencies:

    "native-base": "^0.4.9",
    "react": "15.2.1",
    "react-native": "0.29.0",
    "react-native-vector-icons": "^2.0.3"

image

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
sankhadeeproy007commented, Jul 12, 2016

Can you replace line no. 24 in NativeBase/Components/Widgets/Header.js with the following code paddingTop: (Platform.OS === 'ios' ) ? 15 : 0,. That should do the trick. Also the header color is a variable and can be changed from NativeBase/Components/Themes/light.js line no. 52. Let me know if that works.

0reactions
pavexcommented, Jul 1, 2017

I have same problem on Android. Left component is very wide (flex: 1). Try to remove Left wrapper component.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Header not aligning to the center - html - Stack Overflow
Try to add width: 100% to the name class, so it would take 100% width of the parent container. .name { text-align: center...
Read more >
Align and arrange objects on a slide - Microsoft Support
Select Picture format > Align and select how you want to align them: Align Left, Align Center, or Align Right. Align Top, Align...
Read more >
Tips for Aligning Icons to Text - CSS-Tricks
Tips for Aligning Icons to Text · Tip 1: Decide on an icon format and stick to it · Tip 2: Use similarly...
Read more >
Components - Bootstrap
Icon classes cannot be directly combined with other components. They should not be used along with other classes on the same element.
Read more >
background-position - CSS: Cascading Style Sheets | MDN
The background-position CSS property sets the initial position for ... If one value is left or right , then the other value may...
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