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.

justifyContent on Web not working correctly

See original GitHub issue

CleanShot 2021-05-07 at 10 01 31

Hello, I want to make the text on the left and the logo on the right, it is working on Mobile Correctly. With a View direction row and justify content with space between. But on the web it is not working correctly, only if I delete the fresnel divs in browser it is working. I don’t know why there is this empty fresnel divs.

Please help me, Thank you.

 <View
      sx={{
        marginTop: [Constants.statusBarHeight, 15],
        mx: [20, 25],
        flexDirection: "row",
        alignItems: "center",
        flex: [0, 1],
        justifyContent: "space-between",
      }}
    >
      <Text
        sx={{
          color: ["primary"],
          fontSize: [22, 30],
          fontWeight: ["bold"],
        }}
      >
        Text
      </Text>

      <Image
        source={logo}
        style={{ resizeMode: "contain" }}
        sx={{
          height: [70],
          width: [70],
        }}
      />
    </View>

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
nandorojocommented, May 20, 2021

I’ve solved this on the new version of Dripsy.

yarn add dripsy@canary

Please install that, thanks! See more at #101

1reaction
nandorojocommented, May 18, 2021

The solution I left works, it just unfortunately is a shortcoming of Dripsy’s web API. webContainerSx is the current solution. It’s sadly because the creator of React Native Web won’t let us use className, even as an escape hatch. 🤷🏼‍♂️

So I’m going to close this for now. Know that I face this issue too, and am actively looking for better APIs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The 'justify-content' property isn't working - Stack Overflow
Go to inspect element and check if .justify-content-center is listed as a class name under 'Styles' tab. If not, probably you are using...
Read more >
justify-content - CSS: Cascading Style Sheets - MDN Web Docs
The CSS justify-content property defines how the browser distributes space between and around content items along the main-axis of a flex ...
Read more >
Help Flexbox justify Content not loading - HTML-CSS
I'm currently working on my website and I'm running into a problem. In my code, I set justify-content to Space around.
Read more >
Cross-browser issues with Flexbox - fastfwd
It means adding another div or pseudo-elements. Moreover, you have to have exact widths of at least one element to make sure they...
Read more >
Justify content: center & align-items: flex-start isn't working?
My problem pertains to the right side, and aligning the text. The right div is set to flex. So i used justify-content: center...
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