Why is my css grid not working in Chrome (works in all other browsers)

可紊 提交于 2021-02-19 09:00:40

问题


I've setup a css grid with 3 columns to display our portfolio. I found a working code for Firefox and Internet Explorer and Safari. However on Chrome it doesn't show my grid at all, all the pictures are below each other. See the website: http://www.ddw-sanitair.be

Additionally it does not accept the 'display: none' class on some of the pictures, hence the double/triple images ...

Any suggestions?

I tried to add grid-auto-rows: 270px; as suggested in another thread. I tried adding grid-template-rows: repeat(3, 1fr); as suggested in another thread.

But this didn't change anything in Chrome ...

.portfolio-group {
    position: relative;
    display:grid;
    align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-auto-rows: 270px;

Expected result = a nice reactive grid with 3 columns and 3 rows (in browser view).


回答1:


i hope you will get the ans from this site: `https://rachelandrew.co.uk/archives/2014/06/27/css-grid-layout-getting-to-grips-with-the-chrome-implementation/



来源:https://stackoverflow.com/questions/57830435/why-is-my-css-grid-not-working-in-chrome-works-in-all-other-browsers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!