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.

[Image] padding not work

See original GitHub issue

Environment: OS: macOS Sierra 10.12.6 Node: 8.6.0 Yarn: 1.1.0 npm: 5.3.0 Watchman: Not Found Xcode: Not Found Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed) react: 16.0.0-alpha.12 => 16.0.0-alpha.12 react-native: 0.48.3 => 0.48.3

====================

I just write the simple code below. The problem is Why the padding in <Image> style not work?

            <View style={{
                flex: 1,

            }}
            >
                <Image style={{
                    flex: 1,
                    padding: 10,
                }}
                       source={{uri: 'd7'}}
                       resizeMode='stretch' />
            </View>

This is the result. You can see there is no padding around image. image

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
lwinkyawmyatcommented, Oct 3, 2017

Hi @walfud , The Image component is only to show image. So, Why do you need to padding on Image component? Actually you should learn to know about Image component on here.

Should read before reporting new issues.

0reactions
facebook-github-botcommented, Oct 10, 2017

Hey, thanks for reporting this issue! It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce the issue being reported. I am going to close this, but feel free to open a new issue with the additional information provided. Thanks! See “What to Expect from Maintainers” to learn more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

margin / padding not working - Stack Overflow
OK, so I think you've tried to add margin and padding to .brandList div which has display: inline property.
Read more >
How does Image Padding work in HTML or CSS? - eduCBA
In CSS code, noPadding class has without padding with 5px border. No padding does not give any space around the image. It strictly...
Read more >
Why is padding not working? (Example) | Treehouse Community
I am supposed to add 25px to top padding and 95px to bottom padding of primary-content class and I typed it like this...what...
Read more >
How to Fix Image Padding and Spacing in HTML Emails
How to Fix Image Padding and Spacing in HTML Emails ... Unfortunately, not all these solutions will work if your image is smaller...
Read more >
Margin and Padding not working post upgrade - WordPress.org
Post the elementor Pro upgrade all my margin and padding settings stopped working for (1) Special heading and (2) after and before images....
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