Alex
KPCKevin Powell - Community
•Created by Alex on 7/30/2023 in #front-end
How to center a grid-item horizontally within grid-container when item doesn't span the full width
I see -thanks!
17 replies
KPCKevin Powell - Community
•Created by Alex on 7/30/2023 in #front-end
How to center a grid-item horizontally within grid-container when item doesn't span the full width
How would i make it so the max-width has the value of span 4 - is that where subgrid comes into play?
17 replies
KPCKevin Powell - Community
•Created by Alex on 7/30/2023 in #front-end
How to center a grid-item horizontally within grid-container when item doesn't span the full width
Yeah, but i do want the img to have the full width of the grid-item - it's part of a responsive layout. Think i'll just have to use media queries and specify a start column - but thanks for all ur help!
17 replies
KPCKevin Powell - Community
•Created by Alex on 7/30/2023 in #front-end
How to center a grid-item horizontally within grid-container when item doesn't span the full width
I forgot to mention the content of the grid-item is an img, so that prob why it doesn't work, since it just has width: 100%
17 replies
KPCKevin Powell - Community
•Created by Alex on 7/30/2023 in #front-end
How to center a grid-item horizontally within grid-container when item doesn't span the full width
No, now im actually not - just didn't work before, let me test again
17 replies
KPCKevin Powell - Community
•Created by Alex on 7/30/2023 in #front-end
How to center a grid-item horizontally within grid-container when item doesn't span the full width
If it makes my question more clear: I bassicly just want all grid-items centered horizontally within the grid-container, if the item's dont span all columns
17 replies
KPCKevin Powell - Community
•Created by Alex on 7/30/2023 in #front-end
How to center a grid-item horizontally within grid-container when item doesn't span the full width
Sorry if i was unclear - i meant the content i have inside the grid-item itself has
width: auto
, so by increasing the span of the grid-item, the content inside would just appear wider, instead of centered - does that make sense? Thanks for pointing out the css 🙂17 replies
KPCKevin Powell - Community
•Created by Alex on 7/30/2023 in #front-end
How to center a grid-item horizontally within grid-container when item doesn't span the full width
The content inside the grid-item has the width of the grid-item, so the grid-item/content would just span the whole width - but thanks anyways
17 replies