Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about why flex has different behaviors between chrome and firefox #1

Open
Suiteprecure opened this issue Feb 14, 2022 · 0 comments

Comments

@Suiteprecure
Copy link

hi, I found different flex behavior on chrome and firefox when I was following the lecture video "Text Overlay Effect with Flexbox" on 03:10.
After I add "display: flex" to figure, I found chrome has different behaviors than firefox.
Here is the code after adding "display: flex": https://codepen.io/nancyz/pen/NWwvEmV?editors=1100

screen shot on chrome
chrome-flex
screen shot on firefox
firefox-flex

after I try to add wrapper for image and add height for image css, I found the behaviors of flex acts similarly
here is the code after I made some modification and looks same on both chrome and firefox: https://codepen.io/nancyz/pen/NWwvEVV?editors=1100

I am curious why browsers have different behavior like this. Is adding wrapper to image solve this problem? If so, why adding wrapper solve this problem?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant