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

Fix wrong image ratio issues #2

Open
markusprograms opened this issue Jan 7, 2024 · 2 comments
Open

Fix wrong image ratio issues #2

markusprograms opened this issue Jan 7, 2024 · 2 comments

Comments

@markusprograms
Copy link

Some of the images on Vexcess academy have wrong size and ratio because they are children of flex divs.

vxsacademy org_computer-programming_uY3DeOlpzxotea
vxsacademy org_profile_me

For children of flex elements, the width and height CSS properties don't work in most browsers. To achieve the correct behaviour, you'll have to use min-width and min-height properties instead.

@vExcess
Copy link
Contributor

vExcess commented Jan 12, 2024

Oh weird. I've tested the website in Firefox and Chromium and cannot replicate this behavior. Since most browsers are forks of either Firefox or Chromium it should work in them too. The only mainstream browser it might not work in is Safari because debugging Safari is a pain and Safari only runs on Mac and macbooks are severely expensive.

What specific browser are you using? And what operating system and device? And what size are you rendering the page at?

@markusprograms
Copy link
Author

I've tested this on Windows 10: Chrome, Edge, Firefox (newest versions) and on Android: Chrome and Firefox. It has the same behaviour on all of these. But it isn't about the browser or the device. It works fine, if you have a large screen (eg 4K or more). For smaller screens, the images reduce their size to free up space for the rest of the elements. Hovewer, they are deformed and look weird.

If you wanted, you can add both width and min-width attributes to the images to make sure it works properly on any screen size.

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

2 participants